The only engine where the chamber wall and the moving part are the same curve. You asked Claude. Glyph drew it. An epitrochoid for a housing, a triangular rotor that sweeps three working chambers per revolution, and three explosions per turn instead of one.
"Draw me a Wankel rotary engine housing. Use the Glyph viz grammar with a parametric function:x(t) = R·cos(t) + e·cos(3t),y(t) = R·sin(t) + e·sin(3t)— the classic epitrochoid with a 1:3 frequency ratio, R = 4 and e = 1. Pencil-sketch style. Beautiful enough for a child to see the three lobes; clear enough that an engineer recognizes why a triangular rotor with rounded sides exactly fits."
— what to say to your AI agent. Claude writes the Glyph spec; the compiler samples the epitrochoid 400 times around one revolution.
The Wankel housing isn't just any closed curve — it's the specific epitrochoid generated by a 1:3 frequency ratio. That ratio is what guarantees a triangular rotor can sweep the chamber with no gaps and no overlaps.
At a 1:1 ratio the two cosines just sum — you get a translated circle. No lobes. No room for a polygon rotor to sweep different volumes at different angles.
One bump, one indentation. A two-sided "rotor" could fit but produce only two working chambers per revolution — worse than a piston engine. Not used.
Three lobes. A triangular rotor sweeps three working chambers per revolution — intake, compression, combustion, and exhaust all happening in three places at once. The geometry IS the engine cycle.
Claude writes the JSON; Glyph samples the epitrochoid 400 times around one full revolution and emits the housing outline. Same spec → byte-identical SVG, every platform, every run.
// wankel-rotor.json — epitrochoidal housing curve { "version": "glyph/0.1", "title": "Wankel rotor housing", "data": { "function": { "shape": "function", "parameter": { "name": "t", "min": 0, "max": 6.283185307179586, "samples": 400 }, // epitrochoid: 1:3 frequency ratio "xExpr": "4*cos(t) + cos(3*t)", "yExpr": "4*sin(t) + sin(3*t)" } }, "layers": [{ "mark": "line", "encoding": { "x": { "field": "x" }, "y": { "field": "y" } } }] }
Change 3 to 2 or 4 and you get a different chamber count. Real Wankel engines use ratios slightly off integer (e.g. 2:3 with eccentricity scaling) to leave room for apex seals — but the 1:3 idealisation captures the soul of the design. View on GitHub.
Byte-stable across Ubuntu / macOS / Windows × Node 20 / 22. The three-lobed symmetry is in the data — a 1/3-rotation map of the curve onto itself.
Trochoidal curves describe a huge family of engines, pumps, and gears. Tell Claude the chamber count, the ratio, or the application.
"Draw me a gerotor pump — like a Wankel but with an inner and outer rotor with one more lobe outside than inside. Show the chambers sweeping fluid around."
"Plot a hypotrochoid family: same outer circle, but vary the inner radius from 1 to 5. Show how the curve goes from a near-circle to a rosette."
"Show me the trochoid for a 2:3 Wankel — two-lobed instead of three. Used in air-conditioning compressors. Side-by-side with the 1:3 automotive Wankel."
"Trace the path of a single rotor apex as the rotor turns through one revolution. Overlay the trace on the housing — show that the rotor apex IS the curve that defines the housing."