Exemplo n.º 1
0
        public Plot3DMainForm(float[, ,] vals)
        {
            InitializeComponent();
            this.comboBox1.SelectedIndex = 0;
            sr = new Surface3DRenderer(70, 35, 40, 0, 0, ClientRectangle.Width, ClientRectangle.Height, 0, 0, vals, this);
            sr.SetFunction("val");
            sr.recalculateFunction();
            minNum.Minimum = (decimal)sr.minZ;
            maxNum.Maximum = (decimal)sr.maxZ;
            maxNum.Minimum = (decimal)sr.minZ;
            minNum.Maximum = (decimal)sr.maxZ;
            minNum.Value   = (decimal)sr.minZ;
            maxNum.Value   = (decimal)sr.maxZ;

            Form1_Resize(null, null);
            ResizeRedraw    = true;
            DoubleBuffered  = true;
            this.vals       = vals;
            trackBar2.Value = sr.Quality;
            xNum.Maximum    = vals.GetLength(0);
            yNum.Maximum    = vals.GetLength(1);
            zNum.Maximum    = vals.GetLength(2);
            xNum.Value      = 1;
            yNum.Value      = 1;
            zNum.Value      = 1;
            xNum.Minimum    = 1;
            yNum.Minimum    = 1;
            zNum.Minimum    = 1;
        }
Exemplo n.º 2
0
 private void xNum_ValueChanged(object sender, EventArgs e)
 {
     sr.ax = (int)xNum.Value - 1;
     sr.recalculateFunction();
     Invalidate();
 }