private void button3_Click(object sender, EventArgs e) { double ind_scale = Double.Parse(textBox5.Text); pol.scale(ind_scale); pol.Display(projection); ClearWithout(); foreach (var i in pol.edges) { g.DrawLine(col, i.Item1, i.Item2); } pictureBox1.Image = pictureBox1.Image; }
private void button2_Click(object sender, EventArgs e) { pol = new Polyhedron(); switch (comboBox1.SelectedItem.ToString()) { case "Гексаэдр": break; case "Тетраэдр": pol.Tetrahedron(); break; } switch (comboBox3.SelectedItem.ToString()) { case "Изометрическая": projection = 1; break; case "Ортогональная на Х": projection = 2; break; case "Ортогональная на Y": projection = 3; break; case "Ортогональная на XoY": projection = 4; break; } pol.Display(projection); foreach (var i in pol.edges) { g.DrawLine(col, i.Item1, i.Item2); } foreach (var i in pol.edges) { g.DrawLine(col, i.Item1, i.Item2); } textBox1.Text = ""; foreach (var i in pol.vertices2D) { textBox1.Text += "(" + i.X + " " + i.Y + ") "; } pictureBox1.Image = pictureBox1.Image; }