Skip to main content

Module parametric

Module parametric 

Source
Expand description

§Parametric Surface Rendering

Mathematical surfaces evaluated over (u, v) parameter space, tessellated into triangle meshes suitable for glyph-grid rendering.

Every surface implements the Surface trait, which provides evaluate(u, v) -> Vec3 and normal(u, v) -> Vec3. The SurfaceMesh struct tessellates any surface into a triangle mesh with computed normals, tangents, and UV coordinates.

§Included surfaces

  • Sphere, Torus, MobiusStrip, KleinBottle
  • BoySurface, RomanSurface, CrossCap
  • TrefoilKnot, FigureEight
  • Catenoid, Helicoid, EnneperSurface, DiniSurface
  • FunctionSurface (user-defined closure)

Structs§

BlendedSurface
Compose two surfaces by blending them with a weight function.
BoySurface
Boy’s surface — an immersion of the real projective plane in R^3.
Catenoid
A catenoid — a minimal surface of revolution formed by a catenary.
CrossCap
Cross-cap — another immersion of the real projective plane in R^3.
DiniSurface
Dini’s surface — a twisted pseudosphere with constant negative curvature.
DisplacedSurface
Displace a surface along its normals by a scalar field.
EnneperSurface
Enneper’s minimal surface — self-intersects at higher ranges.
FigureEight
Figure-eight knot — a tube surface around the figure-eight curve.
FunctionSurface
A surface defined by a user-provided closure.
Helicoid
A helicoid — a minimal surface swept by a line rotating about and translating along an axis.
IsoCurves
Extract iso-parameter curves from a surface.
KleinBottle
The Klein bottle — a non-orientable closed surface. Uses the “figure-8” immersion in R^3.
MobiusStrip
A Mobius strip — a surface with only one side.
RayHit
Result of a ray-mesh intersection test.
RevolutionSurface
Create a surface of revolution from a 2D profile curve.
RomanSurface
Steiner’s Roman surface — a self-intersecting immersion of the real projective plane.
RuledSurface
Create a ruled surface between two space curves.
Sphere
A unit sphere centered at the origin.
SurfaceMesh
A tessellated mesh of a parametric surface.
SurfaceVertex
A vertex in a surface mesh.
Torus
A torus with major radius R and minor radius r.
TrefoilKnot
Trefoil knot — a tube surface of given radius wrapped around the trefoil curve.
TriangleIndex
A triangle index triple.

Enums§

SurfaceKind
Enumeration of built-in surface types for catalog purposes.

Traits§

Surface
A parametric surface defined over (u, v) in [0, 1] x [0, 1].