private void PlotConstantFunction(IChartAdapter2D adapter, Explicit2DParameters explicitParameters) { ConstantFunctionPlotter plotter = new ConstantFunctionPlotter((Constant)explicitParameters.Function); double[] result = null; switch (explicitParameters.PlotMode) { case PlotMode.ByNumPoints: result = plotter.Plot(explicitParameters.Min, explicitParameters.Max, explicitParameters.NumPoints); break; //case PlotMode.ByClientArea: // throw new NotSupportedException("This type of PlotMode not supported"); case PlotMode.ByStep: result = plotter.Plot(explicitParameters.Min, explicitParameters.Max, explicitParameters.Step); break; } if (!_automaticMode) { double[] tempArray = (double[])result.Clone(); Array.Sort(tempArray); double min = tempArray[0]; Array.Reverse(tempArray); double max = tempArray[0]; adapter.SetAxes(explicitParameters.Min, explicitParameters.Max, min, max); } adapter.Plot(result, _series); }
private void PlotParametric2DFunction(IChartAdapter2D adapter, Parametric2DParameters parametricParameters) { Parameter2DFunctionPlotter plotter = new Parameter2DFunctionPlotter((Parameter2DFunction)parametricParameters.Function); Point2D[] result = null; switch (parametricParameters.PlotMode) { case PlotMode.ByNumPoints: result = plotter.Plot(parametricParameters.Min, parametricParameters.Max, parametricParameters.NumPoints); break; //case PlotMode.ByClientArea: // throw new NotSupportedException("This type of PlotMode not supported"); case PlotMode.ByStep: result = plotter.Plot(parametricParameters.Min, parametricParameters.Max, parametricParameters.Step); break; } if (!_automaticMode) { if (adapter.MinY != 0 && adapter.MaxY != 0) { adapter.SetAxes(parametricParameters.Min, parametricParameters.Max, adapter.MinY, adapter.MaxY); } } adapter.Plot(result, _series); }
private void PlotConstantFunction(IChartAdapter2D adapter, Implicit2DParameters implicitParameters) { ConstantFunctionPlotter plotter = new ConstantFunctionPlotter((Constant)implicitParameters.Function); double[] result = null; //result = plotter.Plot() adapter.Plot(result, _series); }
private void PlotExplicitFunction(IChartAdapter2D adapter, Implicit2DParameters implicitParameters) { Explicit2DFunctionPlotter plotter = new Explicit2DFunctionPlotter((Explicit2DFunction)implicitParameters.Function); double[] result = null; plotter.Plot(implicitParameters.PointA, implicitParameters.PointB, implicitParameters.AreaSize); adapter.Plot(result, _series); }
private void PlotImplicit2DFunction(IChartAdapter2D adapter, Implicit2DParameters implicitParameters) { Implicit2DFunctionPlotter plotter = new Implicit2DFunctionPlotter((Implicit2DFunction)implicitParameters.Function); plotter.GridFactor = implicitParameters.GridFactor; Point2D[] resultPoints = plotter.Plot( implicitParameters.PointA, implicitParameters.PointB, implicitParameters.AreaSize); adapter.SetAxes(implicitParameters.PointA.X, implicitParameters.PointB.X, implicitParameters.PointA.Y, implicitParameters.PointB.Y); adapter.Plot(resultPoints, _series); }
private void PlotImplicit2DFunction(IChartAdapter2D adapter, Implicit2DParameters implicitParameters) { Implicit2DFunctionPlotter plotter = new Implicit2DFunctionPlotter((Implicit2DFunction)implicitParameters.Function); plotter.GridFactor = implicitParameters.GridFactor; Point2D[] resultPoints = plotter.Plot( implicitParameters.PointA, implicitParameters.PointB, implicitParameters.AreaSize); adapter.SetAxes(implicitParameters.PointA.X, implicitParameters.PointB.X, implicitParameters.PointA.Y, implicitParameters.PointB.Y); adapter.Plot(resultPoints, _series); }
private void PlotConstantFunction(IChartAdapter2D adapter, Explicit2DParameters explicitParameters) { ConstantFunctionPlotter plotter = new ConstantFunctionPlotter((Constant)explicitParameters.Function); double[] result = null; switch(explicitParameters.PlotMode) { case PlotMode.ByNumPoints: result = plotter.Plot(explicitParameters.Min, explicitParameters.Max, explicitParameters.NumPoints); break; //case PlotMode.ByClientArea: // throw new NotSupportedException("This type of PlotMode not supported"); case PlotMode.ByStep: result = plotter.Plot(explicitParameters.Min, explicitParameters.Max, explicitParameters.Step); break; } if (!_automaticMode) { double[] tempArray = (double[])result.Clone(); Array.Sort(tempArray); double min = tempArray[0]; Array.Reverse(tempArray); double max = tempArray[0]; adapter.SetAxes(explicitParameters.Min, explicitParameters.Max, min, max); } adapter.Plot(result, _series); }
private void PlotConstantFunction(IChartAdapter2D adapter, Implicit2DParameters implicitParameters) { ConstantFunctionPlotter plotter = new ConstantFunctionPlotter((Constant)implicitParameters.Function); double[] result = null; //result = plotter.Plot() adapter.Plot(result, _series); }
private void PlotParametric2DFunction(IChartAdapter2D adapter, Parametric2DParameters parametricParameters) { Parameter2DFunctionPlotter plotter = new Parameter2DFunctionPlotter((Parameter2DFunction)parametricParameters.Function); Point2D[] result = null; switch(parametricParameters.PlotMode) { case PlotMode.ByNumPoints: result = plotter.Plot(parametricParameters.Min, parametricParameters.Max, parametricParameters.NumPoints); break; //case PlotMode.ByClientArea: // throw new NotSupportedException("This type of PlotMode not supported"); case PlotMode.ByStep: result = plotter.Plot(parametricParameters.Min, parametricParameters.Max, parametricParameters.Step); break; } if (!_automaticMode) { if (adapter.MinY != 0 && adapter.MaxY != 0) adapter.SetAxes(parametricParameters.Min, parametricParameters.Max, adapter.MinY, adapter.MaxY); } adapter.Plot(result, _series); }
private void PlotExplicitFunction(IChartAdapter2D adapter, Implicit2DParameters implicitParameters) { Explicit2DFunctionPlotter plotter = new Explicit2DFunctionPlotter((Explicit2DFunction)implicitParameters.Function); double[] result = null; plotter.Plot(implicitParameters.PointA, implicitParameters.PointB, implicitParameters.AreaSize); adapter.Plot(result, _series); }