Skip to content

rosslh/Mandelbrot.site

Repository files navigation

Mandelbrot.site icon

Mandelbrot.site

Mandelbrot.site is an interactive Mandelbrot set explorer that runs in your browser. Zoom, adjust the rendering, save images, and share exact views with a link.

GitHub branch check runs Uptime Robot status Uptime Robot ratio (30 days) Hosted in Canada with MapleDeploy

As seen in: BBC Science FocusCreative MachineHacker NewsScience News

Features

  • Explore the Mandelbrot set with scroll zooming, region selection, and live coordinates.
  • Zoom far beyond floating-point limits: deep views are rendered with arbitrary-precision perturbation theory.
  • Tune the image with iteration, resolution, palette, and exponent controls.
  • Download high-resolution images of interesting views.
  • Share links that preserve the exact location and zoom level.

Gallery

Example images generated with Mandelbrot.site:

Mandelbrot Example 1 Mandelbrot Example 2

View more images

Architecture

The app renders fractal tiles in the browser. The computation-heavy Mandelbrot code is written in Rust, compiled to WebAssembly with wasm-pack, and run in parallel with Web Workers through threads.js. The interface is built with TypeScript and Leaflet.js, giving the fractal a map-like pan and zoom experience.

Ordinary 64-bit floats run out of precision around zoom level 44, so deep zooms use perturbation theory: each view computes one reference orbit with arbitrary-precision arithmetic (dashu), and every pixel iterates only its tiny delta from that orbit using fast hardware floats with an extended exponent range, rebasing against the orbit to avoid glitches. Coordinates are tracked as arbitrary-precision decimal strings, and Leaflet's own f64-limited zoom is kept shallow by periodically re-anchoring the map origin to the view center, so the effective zoom depth is unlimited.

Mandelbrot.site is also a Progressive Web App, with service-worker support for offline use and reduced network dependency.

Development

To work on the project, install Node.js and Rust. Use the Node.js version in client/.nvmrc, then run the npm scripts from the client directory.

A complete guide can be found in CONTRIBUTING.md.

Contributors

Name GitHub Profile
Ross Hill Ross Hill rosslh
Joseph Weissman Joseph Weissman jweissman
Shubhankar Shandilya Shubhankar Shandilya shubhankar-shandilya-india

Want to contribute? Check out the list of open issues and read our contributing guidelines.

About

Explore the Mandelbrot set in your browser, rendered with Rust and WebAssembly.

Topics

Resources

License

Code of conduct

Contributing

Stars

311 stars

Watchers

5 watching

Forks

Contributors