code
Projects and code experiments.
- game of life →
Conway's Game of Life running in a canvas, wrapping at the edges. Click or drag to draw โ it pauses while you do.
- drum machine →
A 16-step sequencer with synthesized drum sounds โ no samples, just oscillators and filtered noise through the Web Audio API.
- cellular automaton →
An elementary (1D) cellular automaton explorer โ pick a rule, pick a seed, watch it unfold.
- regex visualizer →
A small regex engine that compiles patterns to an NFA via Thompson's construction, and renders the graph live.
- noise generator →
Four kinds of procedural noise, from pure static to layered Perlin โ same underlying hash function, different amounts of structure.
- turing machine →
A simulator for a real Turing machine โ an unbounded tape, a read/write head, and a handful of states โ running four small preset programs.
- monty hall →
The classic three-door probability puzzle โ play it by hand, or simulate a few hundred rounds and watch switching pull ahead.
- euclidean rhythm →
Bjorklund's algorithm distributes N hits as evenly as possible across M steps โ a natural sibling to the drum machine, generated rather than hand-programmed.
- sdf raymarcher →
A scene made of nothing but distance functions, rendered by marching rays through them one step at a time โ no meshes, no triangles, no three.js.
- lambda reducer →
An untyped lambda calculus interpreter โ step through beta-reductions on a syntax tree, watching Church encodings and combinators unfold.
- reaction-diffusion →
The Gray-Scott model: two virtual chemicals react and diffuse across a grid, producing self-organizing spots, stripes, and coral from a few lines of math.