<dependency>
<groupId>net.sf.curvesapi</groupId>
<artifactId>curvesapi</artifactId>
<version>1.06</version>
</dependency>
Curve curve = CurveFactory.createQuadraticBezier(0, 0, 10, 20, 30, 0);
double length = curve.length();
System.out.println("Length of curve: " + length);
SampledCurve sampledCurve = new SampledCurve(curve);
Point2D point = sampledCurve.sample(10);
System.out.println("Point at distance 10: " + point);
List<Point2D> points = new ArrayList<>();
points.add(new Point2D.Double(0, 0));
points.add(new Point2D.Double(10, 20));
points.add(new Point2D.Double(30, 0));
FittingCurve fittingCurve = new FittingCurve();
Curve fittedCurve = fittingCurve.fit(points);
System.out.println("Fitted curve: " + fittedCurve);