Class CubicCurveToBiArc

java.lang.Object
org.jhotdraw8.geom.biarc.CubicCurveToBiArc

public class CubicCurveToBiArc extends Object
  • 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 error
      tolerance - 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 triangle
      b - point B of the triangle
      c - point C of the triangle
      Returns:
      the incenter point G
    • splitAtInflectionPoints

      public static void splitAtInflectionPoints(CubicCurve2D.Double bezier, ArrayDeque<CubicCurve2D.Double> stack)