Class Ellipse

java.lang.Object
org.episteme.core.mathematics.geometry.curves.Ellipse
All Implemented Interfaces:
Function<Real, Vector<Real>>, ContinuousFunction<Real, Vector<Real>>, DifferentiableFunction<Real, Vector<Real>>, Function<Real, Vector<Real>>, Relation<Real, Vector<Real>>, ParametricCurve

public class Ellipse extends Object implements ParametricCurve
Represents an ellipse curve.

An ellipse is a conic section with two focal points. Parametric form: C(t) = (a·cos(t), b·sin(t)) where a is the semi-major axis and b is the semi-minor axis.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • Ellipse

      public Ellipse(Real semiMajorAxis, Real semiMinorAxis)
      Creates a 2D ellipse with the given semi-axes.
      Parameters:
      semiMajorAxis - the semi-major axis (a)
      semiMinorAxis - the semi-minor axis (b)
    • Ellipse

      public Ellipse(PointND center, Real semiMajorAxis, Real semiMinorAxis)
      Creates a 2D ellipse with the given center and semi-axes.
      Parameters:
      center - the center point
      semiMajorAxis - the semi-major axis (a)
      semiMinorAxis - the semi-minor axis (b)
  • Method Details

    • at

      public PointND at(Real t)
      Description copied from interface: ParametricCurve
      Evaluates the curve at parameter t.
      Specified by:
      at in interface ParametricCurve
      Parameters:
      t - the parameter value
      Returns:
      the point on the curve
    • dimension

      public int dimension()
      Description copied from interface: ParametricCurve
      Returns the dimension of the ambient space.
      Specified by:
      dimension in interface ParametricCurve
      Returns:
      the dimension
    • tangent

      public Vector<Real> tangent(Real t, Real h)
      Description copied from interface: ParametricCurve
      Returns the tangent vector at parameter t.

      The tangent vector is the derivative: C'(t) = dC/dt

      Specified by:
      tangent in interface ParametricCurve
      Parameters:
      t - the parameter value
      h - the step size for numerical differentiation
      Returns:
      the tangent vector
    • curvature

      public Real curvature(Real t, Real h)
      Description copied from interface: ParametricCurve
      Returns the curvature at parameter t.

      Curvature: κ = ||C'(t) × C''(t)|| / ||C'(t)||³

      For 2D curves: κ = |x'y'' - y'x''| / (x'² + y'²)^(3/2)

      Specified by:
      curvature in interface ParametricCurve
      Parameters:
      t - the parameter value
      h - the step size for numerical differentiation
      Returns:
      the curvature
    • getSemiMajorAxis

      public Real getSemiMajorAxis()
      Returns the semi-major axis.
      Returns:
      the semi-major axis
    • getSemiMinorAxis

      public Real getSemiMinorAxis()
      Returns the semi-minor axis.
      Returns:
      the semi-minor axis
    • getCenter

      public PointND getCenter()
      Returns the center point.
      Returns:
      the center
    • eccentricity

      public Real eccentricity()
      Returns the eccentricity of the ellipse. e = √(1 - (b/a)²)
      Returns:
      the eccentricity
    • area

      public Real area()
      Returns the area of the ellipse. A = πab
      Returns:
      the area
    • perimeter

      public Real perimeter()
      Returns the approximate perimeter using Ramanujan's approximation. P ≈ π(3(a+b) - √((3a+b)(a+3b)))
      Returns:
      the approximate perimeter