java.lang.Object
org.jhotdraw8.geom.biarc.CubicCurveToBiArc
-
Method Summary
Modifier and TypeMethodDescriptionapproxCubicBezier(CubicCurve2D.Double bezier, int nrPointsToCheck, double tolerance) Algorithm to approximate a bezier curve with bi-arcs.static Point2D.DoubleG: incenter point of the triangle (P1, V, P2).static voidsplitAtInflectionPoints(CubicCurve2D.Double bezier, ArrayDeque<CubicCurve2D.Double> stack)
-
Method Details
-
approxCubicBezier
public static List<BiArc> approxCubicBezier(CubicCurve2D.Double bezier, int nrPointsToCheck, double tolerance) Algorithm to approximate a bezier curve with bi-arcs.- Parameters:
bezier- The bezier curve to be approximated.nrPointsToCheck- The number of points used for calculating the approximation errortolerance- The approximation is accepted if the maximum deviation at the sampling points is smaller than this number.- Returns:
- the approximated biarcs
-
computeIncenterPoint
public static Point2D.Double computeIncenterPoint(Point2D.Double a, Point2D.Double b, Point2D.Double c) G: incenter point of the triangle (P1, V, P2).Reference:
- Incenter of a triangle
- mathopenref.com
- Parameters:
a- point A of the triangleb- point B of the trianglec- point C of the triangle- Returns:
- the incenter point G
-
splitAtInflectionPoints
public static void splitAtInflectionPoints(CubicCurve2D.Double bezier, ArrayDeque<CubicCurve2D.Double> stack)
-