Class Hyperbola
java.lang.Object
org.episteme.core.mathematics.geometry.curves.Hyperbola
Represents a hyperbola in 2D space.
A hyperbola is defined by the equation: (x-h)²/a² - (y-k)²/b² = 1 where (h,k) is the center, a is the semi-transverse axis, and b is the semi-conjugate axis.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsPoint(Point2D p, double tolerance) Checks if a point is on the hyperbola (within tolerance).double[]Returns the asymptote slopes: ±b/adoubledoubledoubleReturns the eccentricity e = c/a.doubleReturns the foci distance from center: c = sqrt(a² + b²).Returns the left focus.Returns the right focus.doubledoubledoublepointOnLeftBranch(double t) Returns a point on the left branch at parameter t.pointOnRightBranch(double t) Returns a point on the right branch at parameter t.toString()
-
Constructor Details
-
Hyperbola
public Hyperbola(double centerX, double centerY, double a, double b) Creates a hyperbola centered at (h, k) with semi-axes a and b. -
Hyperbola
public Hyperbola(double centerX, double centerY, double a, double b, double rotation) Creates a rotated hyperbola.
-
-
Method Details
-
getCenterX
public double getCenterX() -
getCenterY
public double getCenterY() -
getSemiMajorAxis
public double getSemiMajorAxis() -
getSemiMinorAxis
public double getSemiMinorAxis() -
getRotation
public double getRotation() -
getFocalDistance
public double getFocalDistance()Returns the foci distance from center: c = sqrt(a² + b²). -
getRightFocus
Returns the right focus. -
getLeftFocus
Returns the left focus. -
getEccentricity
public double getEccentricity()Returns the eccentricity e = c/a. -
pointOnRightBranch
Returns a point on the right branch at parameter t. -
pointOnLeftBranch
Returns a point on the left branch at parameter t. -
getAsymptoteSlopes
public double[] getAsymptoteSlopes()Returns the asymptote slopes: ±b/a -
containsPoint
Checks if a point is on the hyperbola (within tolerance). -
toString
-