Class IntersectQuadCurveLine

java.lang.Object
org.jhotdraw8.geom.intersect.IntersectQuadCurveLine

public class IntersectQuadCurveLine extends Object
  • Method Details

    • intersectQuadCurveLine

      public static IntersectionResult intersectQuadCurveLine(Point2D p0, Point2D p1, Point2D p2, Point2D a0, Point2D a1)
      Computes the intersection between quadratic bezier curve 'p' and the line 'a'.

      The intersection will contain the parameters 't1' of curve 'a' in range [0,1].

      Parameters:
      p0 - control point P0 of 'p'
      p1 - control point P1 of 'p'
      p2 - control point P2 of 'p'
      a0 - point 0 of 'a'
      a1 - point 1 of 'a'
      Returns:
      the computed intersection
    • intersectQuadCurveLine

      public static IntersectionResult intersectQuadCurveLine(Point2D p0, Point2D p1, Point2D p2, Point2D a0, Point2D a1, double epsilon)
      The code of this method has been derived from intersection.js.

      References:

      intersection.js
      intersection.js, Copyright (c) 2002 Kevin Lindsey, BSD 3-clause license. kevlindev.com
      Parameters:
      p0 - control point of the quad curve
      p1 - control point of the quad curve
      p2 - control point of the quad curve
      a0 - start point of the line
      a1 - end point of the line
      epsilon - the desired precision
      Returns:
      the intersection result
    • intersectQuadCurveLine

      public static IntersectionResult intersectQuadCurveLine(double ax0, double ay0, double ax1, double ay1, double ax2, double ay2, double bx0, double by0, double bx1, double by1, double epsilon)
    • intersectQuadCurveLineEx

      public static IntersectionResultEx intersectQuadCurveLineEx(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y, double a0x, double a0y, double a1x, double a1y)
    • intersectQuadCurveLineEx

      public static IntersectionResultEx intersectQuadCurveLineEx(double p0x, double p0y, double p1x, double p1y, double p2x, double p2y, double a0x, double a0y, double a1x, double a1y, double epsilon)