public Plot3DMainForm()
        {
            InitializeComponent();
            sr             = new Surface3DRenderer(10, 10, 5, 0, 0, ClientRectangle.Width, ClientRectangle.Height, 0.5, 0, 0);
            sr.ColorSchema = new ColorSchema(tbHue.Value);

            double[,] mesh = new double[30, 30];

            for (int x = 0; x < mesh.GetLength(0); x++)
            {
                for (int y = 0; y < mesh.GetLength(1); y++)
                {
                    mesh[x, y] = Math.Sin(x);
                }
            }

            sr.SetMesh(mesh);

            //sr.SetFunction("sin(x1)*cos(x2)/(sqrt(sqrt(x1*x1+x2*x2))+1)*10");
            Form1_Resize(null, null);
            ResizeRedraw   = true;
            DoubleBuffered = true;
        }
예제 #2
0
 public void SetMesh(double[,] mesh)
 {
     sr.SetMesh(mesh);
 }