public static void draw_line(d6 point1, d6 point2, PictureBox p, Graphics g) { point1.x1 = point1.X1 * E1[0] + point1.X2 * E2[0] + point1.X3 * E3[0] + point1.X4 * E4[0] + point1.X5 * E5[0] + point1.X6 * E6[0]; point1.x2 = point1.X1 * E1[1] + point1.X2 * E2[1] + point1.X3 * E3[1] + point1.X4 * E4[1] + point1.X5 * E5[1] + point1.X6 * E6[1]; point2.x1 = point2.X1 * E1[0] + point2.X2 * E2[0] + point2.X3 * E3[0] + point2.X4 * E4[0] + point2.X5 * E5[0] + point2.X6 * E6[0]; point2.x2 = point2.X1 * E1[1] + point2.X2 * E2[1] + point2.X3 * E3[1] + point2.X4 * E4[1] + point2.X5 * E5[1] + point2.X6 * E6[1]; g.DrawLine(Pens.Black, (float)point1.x1 + p.Width / 2, (float)point1.x2 + p.Height / 2, (float)point2.x1 + p.Width / 2, (float)point2.x2 + p.Height / 2); }
public static void draw_point_col(d6 point, PictureBox p, Graphics g, Color col) {//отображение точки на пикчерБоксе Pen pn = new Pen(col); point.x1 = point.X1 * E1[0] + point.X2 * E2[0] + point.X3 * E3[0] + point.X4 * E4[0] + point.X5 * E5[0] + point.X6 * E6[0]; point.x2 = point.X1 * E1[1] + point.X2 * E2[1] + point.X3 * E3[1] + point.X4 * E4[1] + point.X5 * E5[1] + point.X6 * E6[1]; g.DrawRectangle(pn, (float)point.x1 + p.Width / 2, (float)point.x2 + p.Height / 2, 1, 1 /*point.Size, point.Size*/); }
public static void draw_line_col(d6 point1, d6 point2, PictureBox p, Graphics g, Color col) { Pen pn = new Pen(col); point1.x1 = point1.X1 * E1[0] + point1.X2 * E2[0] + point1.X3 * E3[0] + point1.X4 * E4[0] + point1.X5 * E5[0] + point1.X6 * E6[0]; point1.x2 = point1.X1 * E1[1] + point1.X2 * E2[1] + point1.X3 * E3[1] + point1.X4 * E4[1] + point1.X5 * E5[1] + point1.X6 * E6[1]; point2.x1 = point2.X1 * E1[0] + point2.X2 * E2[0] + point2.X3 * E3[0] + point2.X4 * E4[0] + point2.X5 * E5[0] + point2.X6 * E6[0]; point2.x2 = point2.X1 * E1[1] + point2.X2 * E2[1] + point2.X3 * E3[1] + point2.X4 * E4[1] + point2.X5 * E5[1] + point2.X6 * E6[1]; g.DrawLine(pn, (float)point1.x1 + p.Width / 2, (float)point1.x2 + p.Height / 2, (float)point2.x1 + p.Width / 2, (float)point2.x2 + p.Height / 2); }
public static void draw_basis(PictureBox p, Graphics g) { d6 y1 = new d6(100 * E1[0], 100 * E1[1], 100 * E1[2], 100 * E1[3], 100 * E1[4], 100 * E1[5]); d6 y2 = new d6(100 * E2[0], 100 * E2[1], 100 * E2[2], 100 * E2[3], 100 * E2[4], 100 * E2[5]); d6 y3 = new d6(100 * E3[0], 100 * E3[1], 100 * E3[2], 100 * E3[3], 100 * E3[4], 100 * E3[5]); d6 y4 = new d6(100 * E4[0], 100 * E4[1], 100 * E4[2], 100 * E4[3], 100 * E4[4], 100 * E4[5]); d6 y5 = new d6(100 * E5[0], 100 * E5[1], 100 * E5[2], 100 * E5[3], 100 * E5[4], 100 * E5[5]); d6 y6 = new d6(100 * E6[0], 100 * E6[1], 100 * E6[2], 100 * E6[3], 100 * E6[4], 100 * E6[5]); d6 zero = new d6(0, 0, 0, 0, 0, 0); draw_line_color(zero, y1, p, g, Color.FromArgb(255, 255, 0, 0)); draw_line_color(zero, y2, p, g, Color.FromArgb(255, 0, 255, 0)); draw_line_color(zero, y3, p, g, Color.FromArgb(255, 0, 0, 255)); draw_line_color(zero, y4, p, g, Color.FromArgb(255, 255, 255, 0)); draw_line_color(zero, y5, p, g, Color.FromArgb(255, 255, 0, 255)); draw_line_color(zero, y6, p, g, Color.FromArgb(255, 0, 255, 255)); }
static void draw_line_color(d6 point1, d6 point2, PictureBox p, Graphics g, Color col) { Pen pn = new Pen(col); g.DrawLine(pn, (float)point1.X1 + p.Width / 2, (float)point1.X2 + p.Height / 2, (float)point2.X1 + p.Width / 2, (float)point2.X2 + p.Height / 2); }
public static void draw_point(d6 point, PictureBox p, Graphics g) {//отображение точки на пикчерБоксе point.x1 = point.X1 * E1[0] + point.X2 * E2[0] + point.X3 * E3[0] + point.X4 * E4[0] + point.X5 * E5[0] + point.X6 * E6[0]; point.x2 = point.X1 * E1[1] + point.X2 * E2[1] + point.X3 * E3[1] + point.X4 * E4[1] + point.X5 * E5[1] + point.X6 * E6[1]; g.FillEllipse(Brushes.Red, (float)point.x1 + p.Width / 2, (float)point.x2 + p.Height / 2, point.Size, point.Size); }