Example #1
0
        private void createDodehedron_Click(object sender, EventArgs e)
        {
            Polyhedron dodehedron = Polyhedrons.getDodehedron();

            currentPolyhedron = AffineTransform.getMoved(dodehedron, 200, 200, 0);
            foreach (var control in groupBox2.Controls)
            {
                (control as RadioButton).Checked = false;
            }
            drawFigure();
        }
Example #2
0
        private void createOctahedron_Click(object sender, EventArgs e)
        {
            Polyhedron octahedrone = Polyhedrons.getOctahedron();

            currentPolyhedron = AffineTransform.getMoved(octahedrone, 0, 0, (int)(150 * Math.Sqrt(2) / 2));
            foreach (var control in groupBox2.Controls)
            {
                (control as RadioButton).Checked = false;
            }
            drawFigure();
        }
Example #3
0
        private void createHexahedron_Click(object sender, EventArgs e)
        {
            int edgeLength = 100;

            Polyhedron hexahedrone = Polyhedrons.getHexahedron();

            currentPolyhedron = AffineTransform.getMoved(hexahedrone, 0, 0, -edgeLength / 2);
            foreach (var control in groupBox2.Controls)
            {
                (control as RadioButton).Checked = false;
            }
            drawFigure();
        }
Example #4
0
        private void createTetrahedron_Click(object sender, EventArgs e)
        {
            double x = 200, y = 150, z = 0;
            int    r  = 150;
            double bz = z - r * Math.Sqrt(6) / 3.0;

            Polyhedron tetrahedron = Polyhedrons.getTetrahedron();

            currentPolyhedron = AffineTransform.getMoved(tetrahedron, 0, 0, (int)-bz / 2);
            foreach (var control in groupBox2.Controls)
            {
                (control as RadioButton).Checked = false;
            }
            drawFigure();
        }