A library of fun and interactive mathematical curisoities. Built with C++ and rendered in the browser using WebAssembly.
A method of creating fractals using a polygon and a random point inside it.
-
The Logic: In each iteration, a new point is placed a fraction of the distance between the previous point and a random vertex of the polygon.
-
The Result: From pure randomness, the Sierpiński triangle emerges for n =3 and r = 1/2. Other patterns emerge for different n and r. Can you find them?* (Option to change r to be added soon.)
- Language: C++ (Standard 17+)
- Rendering: WebGL (via Emscripten/SDL2)
- Philosophy: Every "wonder" is designed to be mathematically accurate and performant at high iteration counts.
- Mandelbrot Set Visualizer
- Langton's Ant
- Boids Flocking Simulation
- Conway's Game of Life
To compile the library to WASM:
- Ensure
emsdkis installed and activated. - Run:
emcc main.cpp -s WASM=1 -o index.html