catastrophe/README.md
Bruno Postle f5a534a70e Add README and GPLv3+ license
Prepares the repo for pushing to a remote forge: adds a README
describing the project, the full GPLv3 license text, and a
.gitignore for local build/scratch artifacts (__pycache__, Blender
autosaves).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-31 09:41:52 +01:00

1.1 KiB

Catastrophe

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.

This is a personal, exploratory project rather than a polished library — code and comments are kept up to date, but no API stability or reuse outside this repo should be assumed.

Butterfly catastrophe

butterfly_catastrophe.py generates butterfly_catastrophe.stl, a height-field mesh of the equilibrium manifold for the potential

V(x) = x^6 + a*x^4 + c*x^2 + d*x   (a = -3 fixed, b = 0)

Equilibria satisfy dV/dx = 0, which rearranges into a single-valued height field d(x, c), avoiding root-finding or branch-tracking across fold lines. See CLAUDE.md for the full derivation, tuning parameters, and printing notes.

Usage

pip install numpy
python butterfly_catastrophe.py

Output: butterfly_catastrophe.stl, ready to slice and print.

License

GPLv3-or-later — see LICENSE.