import org.curvesapi.Curve; import org.curvesapi.CurveFactory; import org.curvesapi.impl.BezierCurve2D; public class CurveExample { public static void main(String[] args) { Curve curve = CurveFactory.createBezierCurve( new Point2D.Double(100, 100), new Point2D.Double(200, 300), new Point2D.Double(300, 100) ); for (double t = 0; t <= 1; t += 0.01) { Point2D point = curve.getPoint(t); System.out.println("x: " + point.getX() + ", y: " + point.getY()); } } }


上一篇:
下一篇:
切换中文