About
This project collects interactive visualizations of mathematical systems: stochastic processes, algorithms, graph structures, dynamical systems and other ideas from modern mathematics. Each one should be interactive, reproducible from a seed, shareable by URL, and fast enough to use on a phone.
It is an independent open-source project. It runs entirely in the browser as a static site, with no accounts, database or backend.
Architecture
Each visualization is a self-contained module registered with a generic host page. Four layers are kept separate:
- Simulation
- Pure TypeScript state and math, with no React, DOM or rendering engine imports. Each simulation advances in fixed steps and draws randomness from a seeded generator, so the same seed and parameters always produce the same run.
- Renderer
- PixiJS for 2D (the default) or Three.js for genuinely 3D visualizations. A renderer reads simulation state and draws it; it never changes the simulation.
- UI
- React and shadcn/ui controls for parameters, seed, playback and render quality. React holds configuration only; the animation loop runs outside React so frames never trigger React renders.
- Worker
- Simulations exchange plain data, so a CPU-heavy one can move into a Web Worker by changing one field in its definition. The random-walk demo runs on the main thread.
Contributing
New visualizations are welcome. The contributing guide in the repository walks through adding one. Visualizations based on papers or external code must cite their sources and respect their licenses.