Notes on Computing

A growing collection of small, self-contained notes on math, physics, and computer science — usually a short explanation paired with a working program. The goal: if you can build it, you understand it.

Some demos to scroll through.

Each card is math, physics, or biology.

↓ scroll

Two pendulums, chaotic.

Hook one pendulum onto another, let go. Sensitive to a hair — same starting angles, one degree off, and the path the bob carves out ends up in a completely different place.

explore dynamical systems →

The butterfly effect, literally.

Three equations modeling convection in the atmosphere. The trajectory never repeats and never settles — it traces out two looping wings that the system keeps switching between. The original chaotic attractor.

browse the site →

Many futures, one equation.

A stochastic differential equation says: take a tiny step in the drift direction, then a random kick. Run sixty paths from the same starting point and they all spread out — but the shape of the spread is what the equation pins down. Pure Brownian, mean-reverting, or exponential growth, all from one Euler step.

browse the site →

The most famous shape in math.

For each point on the plane: iterate z = z² + c and ask whether it stays bounded. The boundary between "stays" and "explodes" is the Mandelbrot set — and the same shape repeats at every zoom level, forever.

computing…
browse the site →

Where Newton's method gets you.

Drop any starting point on the plane. Run Newton's method on z³ = 1. You'll converge to one of three cube roots — but which root depends on z₀ in an astonishingly intricate way. Each color marks one root's basin; the boundary between them is fractal, all the way down.

computing…
browse the site →

Two rules. Endless life.

A grid of cells. A live cell with 2 or 3 neighbors survives; a dead cell with exactly 3 comes alive. That's it. From those two rules: gliders, oscillators, structures that look like organisms.

browse the site →

Patterns from a uniform soup.

Two chemicals diffuse and react on a grid. Same rules everywhere — but tiny noise breaks the symmetry and the mixture self-organizes into spots, stripes, coral. Alan Turing proposed this in 1952 as the mechanism behind spots on a leopard and stripes on a zebra.

browse the site →

Flocks from three rules.

Every agent does the same thing: match your neighbors' direction, drift toward the local center, keep your distance. No leader, no plan. Coherent flocking emerges anyway — the same way a school of fish or a flock of starlings organizes itself.

browse the site →

A fractal from pure randomness.

Pick three corners. Start anywhere. Repeatedly pick a random corner and move halfway toward it. You'd expect a blob — but a Sierpinski triangle appears, every time. Order hiding inside dice rolls.

browse the site →

The angle nature chose.

Place dots in a spiral with the golden angle (137.5°) between each one. The pattern that emerges is what sunflowers, pinecones, and pineapples do — packs as tightly as possible into a disc. Drag the slider; the result falls apart immediately.

137.51°
browse the site →

Out of sync, then back in.

Fifteen pendulums of slightly increasing length. Each has its own period — so they fall out of phase, drift into a snake, a wave, a braid of motion, then chaos. Wait long enough and they all snap back into a line.

browse the site →

Click to make ripples.

The 2D wave equation on a drumhead. A pulse spreads outward, bounces off the walls, and when two pulses meet they pass right through each other and keep going. Tap anywhere on the canvas to drop in another.

click to drop a pulse
browse the site →

Anything can be drawn with circles.

Any shape — any periodic signal — is just a sum of rotating circles. Stack enough of them and you can trace out arbitrary curves. The cleanest example of how complicated things turn out to be secretly simple.

explore Fourier series →

Brain rhythms from two equations.

Two populations of brain cells — excitatory and inhibitory — coupled in feedback. Excitation recruits inhibition; inhibition suppresses excitation; the cycle produces the brain's gamma rhythm. The phase plane shows the geometry of the oscillation.

1.50
00.51ratet (ms, scrolling 200 ms window)E (excitatory)I (inhibitory)E (excitatory rate)I (inhibitory rate)0101E-nullcline (dE/dt = 0)I-nullcline (dI/dt = 0)trajectorycurrent stateFixed points sit at intersections of the two nullclines.

Stronger E↔I coupling and τ_I > τ_E gives a Hopf bifurcation. E ramps up, recruits I, I suppresses E, both fall, E recovers, cycle repeats. This is the canonical mechanism for cortical gamma rhythms (~40 Hz).

explore the Wilson-Cowan model →

Where the electron lives.

The electron in a hydrogen atom isn't pinned to a point — it's smeared into a cloud. The probability density peaks at a distance set by one parameter ζ. Drag it; the orbital contracts or balloons.

1.00
0123456r (Bohr radii)P(r) = 4πr²|ψ|²r* = 1.00

Exact 1s ground state of hydrogen — ζ = Z = 1. The peak of the radial probability sits at r* = 1/ζ = 1 Bohr radius, the textbook Bohr radius result.

explore Slater orbitals →

There's a whole site below.

Around 250 pages on math, physics, neuroscience, statistics, and programming — each paired with code or a visualization you can play with.

Paper Reproductions

1

Working reimplementations of published methods, validated against the source paper's reported numbers.

Neuroscience & Biomedical Computing

3

Computational neuroscience, biophysics, and other computations applied to biology and medicine.

How this site works

Welcome to notesoncomputing.com — some notes on some things I've learned, or am working toward understanding. I use language models, so not every line of code was written by me nor every line of text. I think that the results of my work, no matter if they are incomplete, are more valuable on this website than just stored away in a place where no one will see them. I cannot promise perfect accuracy, but I can promise to improve the contents every chance I get. I'd rather ship something useful and imperfect than wait for a version that never arrives. This site will always be version 0.0.1 in my mind.

Spot something wrong, or have an idea for a correction or improvement? Email me at adam.c.zettel@gmail.com. If your feedback shapes a page, I'll add an acknowledgement on it.

Elsewhere on the site