private void FillExamples() { const int n = 40; const double r = 8; void CentersToExapmles(Point[] Centers, ref List <Source> expls) { for (int i = 0; i < Centers.Length; i++) { Waves.Circle c = new Waves.Circle(new МатКлассы.Point(Centers[i]), r); Waves.Normal2D[] norm = c.GetNormalsOnCircle(n); var fw = GetFmas(); expls.Add(new Source(c, norm, fw)); } } void CentersToExapmlesDcircle(Point[] Centers, ref List <Source> expls) { for (int i = 0; i < Centers.Length; i++) { Waves.DCircle c = new Waves.DCircle(Centers[i], 16, 5, arg: (135 * Math.PI / 180)); // Waves.Normal2D[] norm = c.GetNormalsOnDCircle(); var fw = GetFmas(); expls.Add(new Source(c, fw)); } } CentersToExapmles(centers, ref examples); CentersToExapmles(centers2, ref examples2); CentersToExapmlesDcircle(centers2, ref examples3); }
private void button1_Click(object sender, EventArgs e) { Waves.DCircle c = new Waves.DCircle(new Point(textBox4.Text.ToDouble(), textBox5.Text.ToDouble()), textBox1.Text.ToDouble(), textBox2.Text.ToDouble(), textBox3.Text.ToDouble(), Convert.ToInt32(numericUpDown1.Value), Convert.ToInt32(numericUpDown2.Value)); Draw(c.GetArraysForDraw(Convert.ToInt32(numericUpDown1.Value), Convert.ToInt32(numericUpDown2.Value)), c, Convert.ToInt32(numericUpDown3.Value)); //c.Center.Show(); }
private void button3_Click(object sender, EventArgs e) { Waves.DCircle c = new Waves.DCircle(new Point(textBox4.Text.ToDouble(), textBox5.Text.ToDouble()), textBox1.Text.ToDouble(), textBox2.Text.ToDouble(), textBox3.Text.ToDouble(), Convert.ToInt32(numericUpDown1.Value), Convert.ToInt32(numericUpDown2.Value)); var fw = GetFmas(); Source source = new Source(c, fw); if (!tosource) { Forms.UG.SetSource(source); } else { Uxt.sources.Add(source); Uform.Recostract(); } this.Close(); }