Class Circle

java.lang.Object
org.episteme.core.mathematics.geometry.curves.Circle
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 Circle extends Object implements ParametricCurve
Represents a circle as a parametric curve.

2D circle: C(t) = center + (r*cos(t), r*sin(t)) 3D circle: C(t) = center + r*(cos(t)*u + sin(t)*v) where u and v are orthonormal vectors in the plane of the circle.

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

    • Circle

      public Circle(PointND center, Real radius)
      Creates a 2D circle in the XY plane.
      Parameters:
      center - the center point
      radius - the radius
    • Circle

      public Circle(PointND center, Real radius, Vector<Real> normal)
      Creates a circle in 3D space with specified plane orientation.
      Parameters:
      center - the center point
      radius - the radius
      normal - the normal vector to the plane (will be normalized)
  • 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 VectorND 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
    • getCenter

      public PointND getCenter()
      Returns the center of the circle.
      Returns:
      the center point
    • getRadius

      public Real getRadius()
      Returns the radius of the circle.
      Returns:
      the radius
    • circumference

      public Real circumference()
      Returns the circumference of the circle.
      Returns:
      2Ï€r
    • toString

      public String toString()
      Overrides:
      toString in class Object