AN INTERACTIVE GUIDE TO find_film.py
A film from noise,
one line at a time.
Simulate. Slide back. Average.
Three ordinary operations find an extraordinary loop.
Walk through the exact Python, change what each line does, and watch the arrays become a film. Then run the algorithm yourself.
THE RULE WE ARE LOOKING FOR
Move forward in time.
Move back in space.
S simulate(q, T/3) = q
q is two chemical fields. S is the array permutation called slide. If the evolved, slid frame matches the starting frame, three repetitions return to the same picture after one period.
This is the simplest algorithm in §16 of “Symmetric animation — simplified”. It imposes a turn with no time delay and a slide paired with a third of a period. The published film also has mirrors; these two operations alone do not specify its full symmetry group.
THE RAW ALGORITHM, EXPLAINED
Follow the code.
Select any line or use Next. Every statement has its own interactive diagram; continued expressions stay together. The diagrams show actual array operations, with schematics labelled where used. Field colors rescale within each diagram to reveal small changes; difference and velocity panels have their own labelled scales.
NOW LET IT FIND THE FILM
The real solver, from noise.
This runs the same numerical algorithm in a background worker, without loading a target frame. Step once to inspect a sweep, or run until the mismatch is below 10⁻¹⁰. The browser uses its own seeded random generator, so its initial noise differs from NumPy’s seed 1.
Ready. Start from a noisy perturbation of (1, 2.3).
What counts as success?
The stopping test measures one discrete symmetry residual. A uniform equilibrium also passes it. Check that the answer varies in both space and time, that a full unprojected period closes, and that a smaller time step gives the same result. The verification accompanying this tutorial does these checks and compares a phase-aligned answer with the published Float32 frame.
The free period and the averaging filter work well for this example. They are a numerical search method, without a general guarantee of convergence or a proof for the continuous PDE. The initial value 6.355 is a period guess, not a measured result; the solver refines it.
TAKE THE EXPERIMENT WITH YOU
Read it. Run it. Check it.
python3 -m pip install numpy
python3 find_film.py
python3 find_film.py --compareThe download keeps the algorithm and adds command-line options for the seed and optional comparison. The comparison downloads the published binary after the search. It only chooses the origin of time; it never supplies a starting answer. The browser’s hero uses the saved film; the solver uses generated noise.