Class Hyperbola

java.lang.Object
org.episteme.core.mathematics.geometry.curves.Hyperbola

public class Hyperbola extends Object
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 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

      public Point2D getRightFocus()
      Returns the right focus.
    • getLeftFocus

      public Point2D getLeftFocus()
      Returns the left focus.
    • getEccentricity

      public double getEccentricity()
      Returns the eccentricity e = c/a.
    • pointOnRightBranch

      public Point2D pointOnRightBranch(double t)
      Returns a point on the right branch at parameter t.
    • pointOnLeftBranch

      public Point2D pointOnLeftBranch(double t)
      Returns a point on the left branch at parameter t.
    • getAsymptoteSlopes

      public double[] getAsymptoteSlopes()
      Returns the asymptote slopes: ±b/a
    • containsPoint

      public boolean containsPoint(Point2D p, double tolerance)
      Checks if a point is on the hyperbola (within tolerance).
    • toString

      public String toString()
      Overrides:
      toString in class Object