Ejemplo n.º 1
0
 public void DrawFunction(DrawableFunction drawableFunction)
 {
     drawer.Clear(drawer.GetNearestColor(defaultColor));
     foreach (var drawableRactangle in drawableFunction.GetDrawableRactangles())
     {
         DrawRactangle(drawableRactangle, drawableFunction.GetheightColorGetter().GetColorByHeight(drawableRactangle.AverageZ));
     }
 }
Ejemplo n.º 2
0
        private void ControlForm_Load(object sender, EventArgs e)
        {
            function        = new ThreeDimensionalFunction(30, 1, ThreeDimensionalFunctionEvaluator.fromString("sin(x) + cos(y)"));
            drawableFuncion = new DrawableFunction(this.zoomIndex, function.GetPoints());
            Panel drawingPanel = PanelGetter.GetPanel();

            functionDrawer = new FunctionDrawer(drawingPanel.CreateGraphics(), drawingPanel.BackColor, drawingPanel.Height, drawingPanel.Width);
        }
Ejemplo n.º 3
0
        private void dxApplyBtn_Click(object sender, EventArgs e)
        {
            double dx;

            if (!double.TryParse(dxField.Text, out dx))
            {
                MessageBox.Show("Value must be a number!");
            }
            else
            {
                function.SetDx(dx);
                drawableFuncion = new DrawableFunction(this.zoomIndex, function.GetPoints());
            }
        }
Ejemplo n.º 4
0
 private void yRotationBtn_Click(object sender, EventArgs e)
 {
     function.RotateAbout(Axis.Y, Convert.ToInt32(angleField.Value));
     drawableFuncion = new DrawableFunction(this.zoomIndex, function.GetPoints());
 }
Ejemplo n.º 5
0
 private void pointCountApplyBtn_Click(object sender, EventArgs e)
 {
     function.UpdatePointCount(Convert.ToInt32(pointCountField.Value));
     drawableFuncion = new DrawableFunction(this.zoomIndex, function.GetPoints());
 }
Ejemplo n.º 6
0
 private void praseFunctionBtn_Click(object sender, EventArgs e)
 {
     function.UpdateZEvaluator(ThreeDimensionalFunctionEvaluator.fromString(functionField.Text));
     drawableFuncion = new DrawableFunction(this.zoomIndex, function.GetPoints());
 }