Class Cylinder

java.lang.Object
org.episteme.core.mathematics.geometry.surfaces.Cylinder
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 Cylinder extends Object implements ParametricSurface
Represents a cylindrical surface.

A cylinder is a surface of revolution with constant radius. Parametric form: S(θ, z) = (r·cos(θ), r·sin(θ), z) where θ ∈ [0, 2π] and z ∈ [z_min, z_max]

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

    • Cylinder

      public Cylinder(Real radius, Real height)
      Creates a cylinder with the given radius and height.
      Parameters:
      radius - the radius
      height - the height
    • Cylinder

      public Cylinder(PointND center, Real radius, Real height)
      Creates a cylinder with the given center, radius, and height.
      Parameters:
      center - the center of the base
      radius - the radius
      height - the height
  • 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
    • normal

      public Vector<Real> normal(Real u, Real v, Real h)
      Description copied from interface: ParametricSurface
      Returns the normal vector at (u, v).

      The normal is computed as: N = ∂S/∂u × ∂S/∂v

      Specified by:
      normal in interface ParametricSurface
      Parameters:
      u - the first parameter
      v - the second parameter
      h - the step size for numerical differentiation
      Returns:
      the unit normal vector
    • gaussianCurvature

      public Real gaussianCurvature(Real u, Real v, Real h)
      Description copied from interface: ParametricSurface
      Returns the Gaussian curvature at (u, v).

      K = (LN - M²) / (EG - F²) where L, M, N are second fundamental form coefficients and E, F, G are first fundamental form coefficients.

      Specified by:
      gaussianCurvature in interface ParametricSurface
      Parameters:
      u - the first parameter
      v - the second parameter
      h - the step size
      Returns:
      the Gaussian curvature
    • getRadius

      public Real getRadius()
      Returns the radius of the cylinder.
      Returns:
      the radius
    • getHeight

      public Real getHeight()
      Returns the height of the cylinder.
      Returns:
      the height
    • getCenter

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

      public Real lateralSurfaceArea()
      Returns the lateral surface area (excluding top and bottom). A = 2Ï€rh
      Returns:
      the lateral surface area
    • totalSurfaceArea

      public Real totalSurfaceArea()
      Returns the total surface area (including top and bottom). A = 2Ï€r(r + h)
      Returns:
      the total surface area
    • volume

      public Real volume()
      Returns the volume of the cylinder. V = πr²h
      Returns:
      the volume