public void FillData(double minX, double maxX, int pointCount, CallBackFunctionD func) { for (int i = 0; i < pointCount; i++) { double currentX = minX + i / ((double)pointCount - 1) * (maxX - minX); double value = func(currentX); mPoints.Add(new PointF((float)currentX, (float)value)); } }
public void FillParametricData(double minT, double maxT, int pointCount, CallBackFunctionD func_x, CallBackFunctionD func_y) { for (int i = 0; i < pointCount; i++) { double currentT = minT + i / ((double)pointCount - 1) * (maxT - minT); double x = func_x(currentT); double y = func_y(currentT); mPoints.Add(new PointF((float)x, (float)y)); } }