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) { double x = textBox1.Text.ToDouble(); double y = textBox4.Text.ToDouble(); double r = textBox5.Text.ToDouble(); int n = numericUpDown2.Value.ToInt32(); Waves.Circle c = new Waves.Circle(new МатКлассы.Point(x, y), r); Waves.Normal2D[] norm = c.GetNormalsOnCircle(n); Source s = new Source(c, norm, GetFmas()); if (Get) { Forms.UG.SetSource(s); } else { Uxt.sources.Add(s); Uform.Recostract(); } this.Close(); }