, Visual C#


         


37.2. pictureBox1_Paint .
private void pictureBox1_Paint(object sender,
PaintEventArgs e)
{
// PictureBox1.
// :
float M_1 = 29; float M_2 = 31;
e.Graphics.ScaleTransform(pictureBox1.Width / M_1,
-pictureBox1.Height / M_2, MatrixOrder.Append);
float M_3 = 2; float M_4 = 2;
e.Graphics.TranslateTransform(pictureBox1.Width / M_3,
pictureBox1.Height / M_4, MatrixOrder.Append);
// M_1, M_2, M_3, M_4 ,
// x,y,z.
// (transformation matrix):
myClassMatrix3D tr = CalculateTransformation();
// :
for (int x = 0; x <= x_max; x++)
for (int y = 0; y <= y_max; y++)
Points[x, y].Transformation(tr);
// myArrayVCsharp[i, j]:
int i, j;
// myArrayVCsharp[i, j]:
int N_x = 2000; int N_y = 1;
// myArrayVCsharp[i, j] Single,
// i = 0,1,2,3,...,N_x; j = 0,1,2,3,...,N_y:
float[,] myArrayVCsharp = new float[N_x + 1, N_y + 1];
//, ,
// , xz, yz, :
int N_1_myArrayCsharp = 0, N_2_myArrayCsharp = 0,
N_3_myArrayCsharp = 0;
// myArrayVCsharp[i, j]
// ,
// xz:
float x1, y1, x2, y2;
Pen myPen = new Pen(Color.Black, 0);
i = -2;// .
for (int x = 0; x <= x_max; x++)
{
x2 =
Convert.ToSingle(Points[x, 0].trans_coord[0]);
y2 =
Convert.ToSingle(Points[x, 0].trans_coord[1]);
for (int y = 1; y <= y_max; y++)
{
x1 = x2; y1 = y2;