java.lang.Object
com.marginallyclever.donatello.bezier.Bezier
4 point cubic bezier splines.
Based on pelson/antigrain
and mattdesl/adaptive-bezier-curve.
- Author:
- Dan Royer
-
Constructor Summary
ConstructorsConstructorDescriptionBezier
(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3) Default constructor that takes four control points. -
Method Summary
Modifier and TypeMethodDescriptionList
<javax.vecmath.Point2d> generateCurvePoints
(double distanceTolerance) Returns a list of points along the curve.
-
Constructor Details
-
Bezier
public Bezier(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3) Default constructor that takes four control points.- Parameters:
x0
- control point 1y0
- control point 1x1
- control point 2y1
- control point 2x2
- control point 3y2
- control point 3x3
- control point 4y3
- control point 4
-
-
Method Details
-
generateCurvePoints
Returns a list of points along the curve. Based on pelson/antigrain and mattdesl/adaptive-bezier-curve.- Parameters:
distanceTolerance
- the allowed tolerance.- Returns:
- a list of points along the curve.
-