Faceted gemstone torus
Geometry
The torus is built from very few segments — m around the ring and n around the tube — so each quad is a large, deliberate plane rather than a smooth approximation.
r(i,j) = r (1 + cut (2 h(i,j) − 1)), h = fract(sin((31 i + j) · 127.1) · 43758.5)P(i,j) = ((R + r(i,j) cos v) cos u, (R + r(i,j) cos v) sin u, r(i,j) sin v)
Every facet is shaded with its own geometric normal, taken as the cross product of two of its edges. Normals are never averaged between neighbours, so the surface stays crisply faceted and each plane catches the light on its own.
The cut slider nudges each vertex's tube radius by a hash of its grid index. The hash is seeded, not random, so the same stone is cut every time the page loads — the facets read as a deliberate gemstone cut instead of a noisy low-poly mesh. Facets also carry a small brightness variation, as if the material were not perfectly uniform.