Configuration for the lathe.
OptionalclosedProfile?: booleanWhether the profile closes back on itself, producing a torus-shape revolution.
Profile polyline, flat [r0, y0, r1, y1, ...].
Must contain at least 2 vertices (length ≥ 4, even).
Optionalsegments?: numberNumber of radial subdivisions around the Y axis. Clamped to a minimum of 3.
Geometry arrays for the surface of revolution, or an error.
Surface-of-revolution geometry: revolve a 2D profile around the Y axis to produce columns, balusters, vases, dome roofs, light fixtures, doughnut shapes.
The profile lies in the
(r, y)half-plane —ris radial distance from the Y axis,yis height. Each profile point sweeps a ring ofsegmentsvertices around the axis. Smooth normals follow the profile's local outward perpendicular.Conventions
profileis a flat array[r0, y0, r1, y1, ...]. List points in order of increasing arc length along the profile. Outward surface normals assume the profile traces CCW in(r, y)space — for the typical "outer skin from bottom to top" path that meansr >= 0andyincreasing.r = 0) are allowed and produce a cone tip; the ring at that vertex collapses to a single point but each duplicated vertex still carries the smooth-shaded normal so triangles around the tip render correctly.segments(default32) is the radial subdivision count around the Y axis.closedProfile(defaultfalse) closes the profile loop so the ring at the last vertex connects back to the ring at the first, producing torus-shape geometry from a closed 2D profile (e.g. a circle offset from the axis).Usage