The whole surface is one grid, hemispheres and cylinder alike: the
cylindrical band is simply the pair of rings whose normals are exactly
radial, so there is no seam ring to weld, no duplicated vertices at the
tangency, and one uv chart over the lot. Normals are analytic — radial about
the cap centre on a hemisphere and about the axis on the cylinder — which
is what makes the tangent circle shade continuously.
height measures the cylindrical section only, matching §24's capsule
collider, so the total extent along Y is height + 2 · radius. v runs 0
at the bottom tip to 1 at the top tip, uniformly in ring index rather
than in arc length: the caps therefore take capSegments / (2·capSegments+1)
of the texture each, whatever the cylinder's length. A texture that must not
stretch at the caps is a uv-parameterization option for the packet that needs
one (decision, R-20).
A capsule about the +Y axis — a cylinder of
heightclosed by two hemispheres ofradius— centred on the origin (§53 "capsule").The whole surface is one grid, hemispheres and cylinder alike: the cylindrical band is simply the pair of rings whose normals are exactly radial, so there is no seam ring to weld, no duplicated vertices at the tangency, and one uv chart over the lot. Normals are analytic — radial about the cap centre on a hemisphere and about the axis on the cylinder — which is what makes the tangent circle shade continuously.
heightmeasures the cylindrical section only, matching §24's capsule collider, so the total extent along Y isheight + 2 · radius.vruns0at the bottom tip to1at the top tip, uniformly in ring index rather than in arc length: the caps therefore takecapSegments / (2·capSegments+1)of the texture each, whatever the cylinder's length. A texture that must not stretch at the caps is a uv-parameterization option for the packet that needs one (decision, R-20).