public static void plot(System.Func <double, double> fx, double XMin = -5, double XMax = 5, double YMin = -5, double YMax = 5, double quality = 0.5) { var function = new Computator.NET.DataTypes.Function(fx, Computator.NET.DataTypes.FunctionType.Real2D); plot(function, XMin, XMax, YMin, YMax, quality); }
public static void plot(Computator.NET.DataTypes.Function f, double XMin = -5, double XMax = 5, double YMin = -5, double YMax = 5, double quality = 0.5) { Computator.NET.DataTypes.Charts.IChart chart; switch (f.FunctionType) { case Computator.NET.DataTypes.FunctionType.Real2D: case Computator.NET.DataTypes.FunctionType.Real2DImplicit: chart = new Computator.NET.Charting.RealCharting.Chart2D(); break; case Computator.NET.DataTypes.FunctionType.Real3D: case Computator.NET.DataTypes.FunctionType.Real3DImplicit: chart = new Computator.NET.Charting.Chart3D.UI.Chart3DControl(); break; case Computator.NET.DataTypes.FunctionType.Complex: case Computator.NET.DataTypes.FunctionType.ComplexImplicit: chart = new Computator.NET.Charting.ComplexCharting.ComplexChart(); break; case Computator.NET.DataTypes.FunctionType.Scripting: default: throw new System.ArgumentOutOfRangeException(); } chart.SetChartAreaValues(XMin, XMax, YMin, YMax); chart.Quality = quality * 100; chart.AddFunction(f); var plotForm = new Computator.NET.Charting.PlotForm(chart); plotForm.Show(); }
public static void plot(System.Func <System.Numerics.Complex, System.Numerics.Complex> fz, double XMin = -5, double XMax = 5, double YMin = -5, double YMax = 5, double quality = 0.5) { var function = new Computator.NET.DataTypes.Function(fz, Computator.NET.DataTypes.FunctionType.Complex); plot(function, XMin, XMax, YMin, YMax, quality); }