, Visual C#


- 3


System.Windows.Forms.CheckState.Checked)

{

DrawSolid(bmp, Cube, Octahedron - 1,

System.Drawing.Color.Black, false);

}

if (checkBox3.CheckState ==

System.Windows.Forms.CheckState.Checked)

{

DrawSolid(bmp, Octahedron, Dodecahedron - 1,

System.Drawing.Color.Green, false);

}

if (checkBox4.CheckState ==

System.Windows.Forms.CheckState.Checked)

{

DrawSolid(bmp, Dodecahedron, Icosahedron_first - 1,

System.Drawing.Color.Blue, false);

}

if (checkBox5.CheckState ==

System.Windows.Forms.CheckState.Checked)

{

DrawSolid(bmp, Icosahedron_first, Icosahedron_last,

System.Drawing.Color.Orange, false);

}

if (checkBox6.CheckState ==

System.Windows.Forms.CheckState.Checked)

{

DrawSolid(bmp, 1, Tetrahedron - 1,

System.Drawing.Color.Salmon, false);

}

}

// :

private void alculateParameters()

{

float theta1; float theta2;

float s1; float s2; float c1; float c2;

float S; float R; float H; float A;

float B; float C; float D; float X;

float Y; float y2; float M; float N;

// :

DesigningLine(0, 0, 0, 0.5f, 0, 0); // x.

DesigningLine(0, 0, 0, 0, 0.5f, 0); // y.

DesigningLine(0, 0, 0, 0, 0, 0.5f); // z.

// (Tetrahedron):

Tetrahedron = NumLines + 1;

S = (float)Math.Sqrt(6);

A = (float)(S / Math.Sqrt(3)); B = -A / 2;

C = (float)(A * Math.Sqrt(2) - 1); D = S / 2;

DesigningLine(0, C, 0, A, -1, 0);

DesigningLine(0, C, 0, B, -1, D);

DesigningLine(0, C, 0, B, -1, -D);

DesigningLine(B, -1, -D, B, -1, D);

DesigningLine(B, -1, D, A, -1, 0);

DesigningLine(A, -1, 0, B, -1, -D);

// (Cube):

Cube = NumLines + 1;

DesigningLine(-1, -1, -1, -1, 1, -1);

DesigningLine(-1, 1, -1, 1, 1, -1);

DesigningLine(1, 1, -1, 1, -1, -1);




- -  - -  - -