Alan Royce Gabriel
Skill-Building Project · Physics Simulation

origami_sim: A GPU Origami Physics Simulator, From Scratch

A from-scratch Python reimplementation of Ghassaei, Demaine & Gershenfeld's GPU origami simulation method (the engine behind Origami Simulator), built to validate crease patterns generated elsewhere in the thesis work.

RoleSole researcher & implementer
StatusComplete, 118 tests passing
StackNumPy, Taichi (GPU), FOLD/SVG I/O

What it does

Turns a flat crease pattern into a triangulated mesh of point-masses joined by springs, then runs a fast, fully parallel explicit physics loop until it settles into its folded 3D shape: no global matrix solve, so the method maps cleanly onto a GPU. Built incrementally: a readable NumPy reference implementation first, then a Taichi GPU port matched to it to round-off, then an interactive viewer and real crease-pattern (SVG) import.

A Miura-ori pattern folding in the simulator
Miura-ori folding under the explicit physics solver.
A hyperbolic paraboloid crease pattern folding with a strain heatmap overlay
A hyperbolic paraboloid ("hypar") pattern, with the blue→red strain heatmap active.

Under the hood

A simple accordion fold pattern folding rigidly
A clean rigid accordion fold, one of the simplest validation patterns.
CPU (NumPy) is treated as the reference implementation; the GPU (Taichi) path must match it to round-off on every change, enforced by a cross-validation test suite (118 tests) alongside finite-difference checks on every force gradient.