Class Ellipse2afp.PrivateAPI

    • Method Detail

      • computeClosestPointOnShallowEllipseInPositiveQuadrant

        public static double[] computeClosestPointOnShallowEllipseInPositiveQuadrant​(double px,
                                                                                     double py,
                                                                                     double horizontalRadius,
                                                                                     double verticalRadius,
                                                                                     boolean computeDistance)
        Compute the closest point to a shallow ellipse centered on (0, 0) and in the positive quadrant. The coordinates of the point must be positive.

        The mathematrical definition of the algorithm is explained in: DistancePointEllipseEllipsoid.pdf (source: geometrictools.com).

        Parameters:
        px - the x coordinate of the point. It must be positive or nul.
        py - the y coordinate of the point. It must be positive or nul.
        horizontalRadius - the horizontal radius.
        verticalRadius - the vertical radius.
        computeDistance - indicates if the distance musst be computed and replied.
        Returns:
        the triplet (closest point x, closest point y, distance to closest point) if computeDistance if true. Otherwise, the triplet (closest point x, closest point y).
      • computeClosestPointOnSolidEllipseInPositiveQuadrant

        public static double[] computeClosestPointOnSolidEllipseInPositiveQuadrant​(double px,
                                                                                   double py,
                                                                                   double horizontalRadius,
                                                                                   double verticalRadius,
                                                                                   boolean computeDistance)
        Compute the closest point to a solid ellipse centered on (0, 0) and in the positive quadrant. The coordinates of the point must be positive.

        The mathematrical definition of the algorithm is explained in: DistancePointEllipseEllipsoid.pdf (source: geometrictools.com).

        Parameters:
        px - the x coordinate of the point. It must be positive or nul.
        py - the y coordinate of the point. It must be positive or nul.
        horizontalRadius - the horizontal radius.
        verticalRadius - the vertical radius.
        computeDistance - indicates if the distance musst be computed and replied.
        Returns:
        the triplet (closest point x, closest point y, distance to closest point) if computeDistance if true. Otherwise, the triplet (closest point x, closest point y).
      • computeFarthestPointOnShallowEllipseInPositiveQuadrant

        public static double[] computeFarthestPointOnShallowEllipseInPositiveQuadrant​(double px,
                                                                                      double py,
                                                                                      double horizontalRadius,
                                                                                      double verticalRadius,
                                                                                      boolean computeDistance)
        Compute the farthest point to a shallow ellipse centered on (0, 0) and in the positive quadrant. The coordinates of the point must be negative.

        This function is an adaptation of the mathematrical definition that is explained in: DistancePointEllipseEllipsoid.pdf (source: geometrictools.com).

        Parameters:
        px - the x coordinate of the point. It must be positive or nul.
        py - the y coordinate of the point. It must be positive or nul.
        horizontalRadius - the horizontal radius.
        verticalRadius - the vertical radius.
        computeDistance - indicates if the distance musst be computed and replied.
        Returns:
        the triplet (closest point x, closest point y, distance to closest point) if computeDistance if true. Otherwise, the triplet (closest point x, closest point y).