Class Ellipsoid

java.lang.Object
org.episteme.core.mathematics.geometry.surfaces.Ellipsoid
All Implemented Interfaces:
Function<Vector<Real>, Vector<Real>>, ContinuousFunction<Vector<Real>, Vector<Real>>, DifferentiableFunction<Vector<Real>, Vector<Real>>, Function<Vector<Real>, Vector<Real>>, Relation<Vector<Real>, Vector<Real>>, ParametricSurface

public class Ellipsoid extends Object implements ParametricSurface
Represents an ellipsoidal surface.

An ellipsoid is a quadric surface with three semi-axes. Parametric form: S(θ, φ) = (a·sin(θ)·cos(φ), b·sin(θ)·sin(φ), c·cos(θ)) where θ ∈ [0, π] (polar angle), φ ∈ [0, 2π] (azimuthal angle) a, b, c are the semi-axes

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

    • Ellipsoid

      public Ellipsoid(Real semiAxisA, Real semiAxisB, Real semiAxisC)
      Creates an ellipsoid with the given semi-axes.
      Parameters:
      semiAxisA - the semi-axis along x
      semiAxisB - the semi-axis along y
      semiAxisC - the semi-axis along z
    • Ellipsoid

      public Ellipsoid(PointND center, Real semiAxisA, Real semiAxisB, Real semiAxisC)
      Creates an ellipsoid with the given center and semi-axes.
      Parameters:
      center - the center point
      semiAxisA - the semi-axis along x
      semiAxisB - the semi-axis along y
      semiAxisC - the semi-axis along z
  • Method Details

    • at

      public PointND at(Real u, Real v)
      Description copied from interface: ParametricSurface
      Evaluates the surface at parameters (u, v).
      Specified by:
      at in interface ParametricSurface
      Parameters:
      u - the first parameter
      v - the second parameter
      Returns:
      the point on the surface
    • partialU

      public Vector<Real> partialU(Real u, Real v, Real h)
      Description copied from interface: ParametricSurface
      Returns the partial derivative ∂S/∂u.

      This is the tangent vector in the u-direction.

      Specified by:
      partialU in interface ParametricSurface
      Parameters:
      u - the first parameter
      v - the second parameter
      h - the step size for numerical differentiation
      Returns:
      the partial derivative vector
    • partialV

      public Vector<Real> partialV(Real u, Real v, Real h)
      Description copied from interface: ParametricSurface
      Returns the partial derivative ∂S/∂v.

      This is the tangent vector in the v-direction.

      Specified by:
      partialV in interface ParametricSurface
      Parameters:
      u - the first parameter
      v - the second parameter
      h - the step size for numerical differentiation
      Returns:
      the partial derivative vector
    • getSemiAxisA

      public Real getSemiAxisA()
      Returns the semi-axis along x.
      Returns:
      the semi-axis a
    • getSemiAxisB

      public Real getSemiAxisB()
      Returns the semi-axis along y.
      Returns:
      the semi-axis b
    • getSemiAxisC

      public Real getSemiAxisC()
      Returns the semi-axis along z.
      Returns:
      the semi-axis c
    • getCenter

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

      public Real volume()
      Returns the approximate volume using the formula V = (4/3)Ï€abc.
      Returns:
      the volume
    • contains

      public boolean contains(PointND point, Real tolerance)
      Checks if a point is inside the ellipsoid.
      Parameters:
      point - the point to check
      tolerance - the tolerance
      Returns:
      true if inside