georegression.geometry
Class UtilEllipse_F64
- java.lang.Object
-
- georegression.geometry.UtilEllipse_F64
-
public class UtilEllipse_F64 extends java.lang.ObjectFunctions for extracting information from ellipses and converting between different ellipse formats.
-
-
Constructor Summary
Constructors Constructor and Description UtilEllipse_F64()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublecomputeAngle(Point2D_F64 p, EllipseRotated_F64 ellipse)Computes the value of 't' used to specify a point's locationstatic Point2D_F64computePoint(double t, EllipseRotated_F64 ellipse, Point2D_F64 output)Computes the point on the ellipse at location 't', where t is an angle in radiansstatic EllipseRotated_F64convert(EllipseQuadratic_F64 input, EllipseRotated_F64 output)Convert from quadratic to rotated formats.static EllipseQuadratic_F64convert(EllipseRotated_F64 input, EllipseQuadratic_F64 output)Convert from rotated to quadratic.static doubleevaluate(double x, double y, EllipseQuadratic_F64 ellipse)Computes the value of the quadratic ellipse function at point (x,y).static doubleevaluate(double x, double y, EllipseRotated_F64 ellipse)Computes the value of the quadratic ellipse function at point (x,y).
-
-
-
Method Detail
-
convert
public static EllipseRotated_F64 convert(EllipseQuadratic_F64 input, EllipseRotated_F64 output)
Convert from quadratic to rotated formats. Equations taken from [1].
[1] David Eberly "Information About Ellipses", Geometric Tools, LLC 2011
- Parameters:
input- Input in quadratic format.output- (Optional) Storage for converted format. Can be null.- Returns:
- Ellipse in rotated format.
-
convert
public static EllipseQuadratic_F64 convert(EllipseRotated_F64 input, EllipseQuadratic_F64 output)
Convert from rotated to quadratic.- Parameters:
input- Input rotated format.output- (Optional) Storage for quadratic format. Can be null.- Returns:
- Ellipse in quadratic format.
-
evaluate
public static double evaluate(double x, double y, EllipseQuadratic_F64 ellipse)Computes the value of the quadratic ellipse function at point (x,y). Should equal 0 if the point is along the ellipse.- Parameters:
x- x-coordinatey- y-coordinateellipse- Ellipse equation being evaluated.- Returns:
- value of ellipse equation at point (x,y)
-
evaluate
public static double evaluate(double x, double y, EllipseRotated_F64 ellipse)Computes the value of the quadratic ellipse function at point (x,y). Should equal 1 if the point is on the ellipse.- Parameters:
x- x-coordinatey- y-coordinateellipse- Ellipse equation being evaluated.- Returns:
- value of ellipse equation at point (x,y)
-
computePoint
public static Point2D_F64 computePoint(double t, EllipseRotated_F64 ellipse, Point2D_F64 output)
Computes the point on the ellipse at location 't', where t is an angle in radians- Parameters:
t- An angle in radians from 0 to 2*PIellipse- Ellipseoutput- (Optional) point on the ellipse . Can be null.- Returns:
- Point on the ellipse
-
computeAngle
public static double computeAngle(Point2D_F64 p, EllipseRotated_F64 ellipse)
Computes the value of 't' used to specify a point's location- Parameters:
p- Point on the ellipseellipse- Ellipse- Returns:
- Angle from -pi to pi
-
-
DataMelt 3.0 © DataMelt by jWork.ORG