This project generates 3D-printable STL models of surfaces from **catastrophe theory** — a branch of mathematics studying how small changes in parameters can cause sudden, discontinuous changes in a system's equilibrium state.
Two surfaces are being produced:
| Model | Catastrophe Type | Codimension | Potential |
- **Rearranged as a height field:** d = −6x⁵ + 12x³ − 2cx
- **Print base:** (x, c) plane — state variable × control parameter
- **Print height:** d (the other control parameter, computed directly)
This parameterisation is **single-valued**: every (x, c) point maps to exactly one d, so the mesh is a simple height field with no multi-valued branches, no root finding, and no fold-edge gaps.
The **fold ridges** — where the surface has zero gradient in x — satisfy ∂d/∂x = 0, giving the bifurcation curve c = 18x² − 15x⁴. This self-intersecting curve is visible as a characteristic ridge on the surface.
The butterfly fold structure is concentrated around x ∈ [−1.1, 1.1] and c ∈ [0, 5.4]; extending X_RANGE beyond ±2 adds flat outer wings with no additional features.