← All work
project

Gem Kit

Reads gem cut definitions, builds closed faceted meshes in a Rust core compiled to WebAssembly, and traces light through them in the browser.

Prototype
A pale faceted gem seen from above at an angle on a dark grid, one pavilion facet highlighted, beside panels listing vertices, faces, triangles and facet roles.
The Dahlia cut, generated from its JSON spec into a closed mesh of 55 facets, with the mesh metrics alongside.
A translucent blue faceted gem with bright refracted streaks inside it, on a dark grid beside a panel of mesh metrics.
Realism mode traces light through the same mesh, refracting and reflecting it inside the stone.

Gem Kit is a workbench for faceting designs. It loads a library of gem cuts stored as JSON, generates a mesh for the selected cut in the browser, and shows it in a 3D viewport beside metrics, facet counts and the editable source. Edit the JSON and the gem regenerates on the spot.

A cut is built as an intersection of half-spaces: every triple of cutting planes is intersected, points outside any plane are dropped, and each face is assembled from the vertices left on its plane. Every plane gets an audit entry, so the tool can say which ones became real facets and why the rest were clipped away. A realism mode traces refraction and internal reflection through the triangles in a fragment shader, sampling red, green and blue separately for dispersion.

Status A prototype workbench with library validation and OBJ, glTF and GLB export scripts; many library cuts still have a reference diagram and no JSON spec.

Zach’s part Built the Rust core, the workbench and the library tooling; the Dahlia cut in the library is his own design.