public Point2D.Double eval(double param, Point2D.Double point) { point.x = 0; point.y = 0; int numKnots = coord.length / 2; for (int i = 0; i < numKnots; i++) { double scale = bernstein(numKnots - 1, i, param); point.x += coord[i * 2] * scale; point.y += coord[i * 2 + 1] * scale; } return point; }
public Point2D.Double eval(double param, Point2D.Double point) { point.x = 0; point.y = 0; int numKnots = coord.length / 2; for (int i = 0; i < numKnots; i++) { double scale = bernstein(numKnots - 1, i, param); point.x += coord[i * 2] * scale; point.y += coord[i * 2 + 1] * scale; } return point; }
public Point2D.Double eval(double param, Point2D.Double point) { point.x = 0; point.y = 0; int numKnots = coord.length / 2; for (int i = 0; i < numKnots; i++) { double scale = bernstein(numKnots - 1, i, param); point.x += coord[i * 2] * scale; point.y += coord[i * 2 + 1] * scale; } return point; }
public Point2D.Double eval(double param, Point2D.Double point) { point.x = 0; point.y = 0; int numKnots = coord.length / 2; for (int i = 0; i < numKnots; i++) { double scale = bernstein(numKnots - 1, i, param); point.x += coord[i * 2] * scale; point.y += coord[i * 2 + 1] * scale; } return point; }