Class Helix

java.lang.Object
org.episteme.core.mathematics.geometry.curves.Helix
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 Helix extends Object implements ParametricCurve
Represents a 3D helix (spiral) curve.

A helix is a curve that winds around a cylinder at a constant angle. Parametric form: C(t) = (r·cos(t), r·sin(t), h·t) where r is the radius and h is the pitch (height per radian).

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

    • Helix

      public Helix(Real radius, Real pitch)
      Creates a helix with the given radius and pitch.
      Parameters:
      radius - the radius of the helix
      pitch - the pitch (height per radian)
    • Helix

      public Helix(PointND center, Real radius, Real pitch)
      Creates a helix with the given center, radius, and pitch.
      Parameters:
      center - the center point (axis passes through this)
      radius - the radius of the helix
      pitch - the pitch (height per radian)
    • Helix

      public Helix(Point3D center, Real radius, Real pitch)
      Creates a helix with the given 3D center, radius, and pitch.
      Parameters:
      center - the center point
      radius - the radius of the helix
      pitch - the pitch (height per radian)
  • 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 Vector3D 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
    • getRadius

      public Real getRadius()
      Returns the radius of the helix.
      Returns:
      the radius
    • getPitch

      public Real getPitch()
      Returns the pitch of the helix.
      Returns:
      the pitch
    • getCenter

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

      public Real heightPerTurn()
      Returns the total height for one complete turn (2Ï€ radians).
      Returns:
      the height per turn