dorkhub

Mandelbrot.site

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

rosslh
Rust31615 forksupdated 3 days ago
visit the demogit clone https://github.com/rosslh/Mandelbrot.site.gitrosslh/Mandelbrot.site

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, live coordinates, and a caption that compares your view's scale to real-world objects.
  • 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, including multibrot exponents.
  • Choose between escape-time, distance-estimate, and atom-domain (period) coloring, with histogram equalization, palette auto-fit, and a live iteration histogram. Color changes recolor cached pixels instantly instead of re-rendering.
  • Inspect any point with a ctrl+hover tooltip showing full-precision coordinates, escape time, distance to the set boundary, and orbit period.
  • Preview the Julia set for the point under your cursor in a navigator panel that doubles as a full-set minimap.
  • Pin, rename, and revisit interesting locations from the sidebar.
  • Export high-resolution PNGs with view parameters embedded in the metadata, plus optional raw iteration data, or record a zoom animation as a video.
  • Share links that preserve the exact location, zoom level, and rendering settings.

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.

The render kernels are heavily optimized: pixels stream through SIMD lanes with lane refill, provably-interior regions are skipped via Mariani-Silver subdivision, and two WebAssembly builds ship side by side. Engines that support relaxed SIMD (detected at runtime with a tiny probe module) get a hardware-FMA build with a substantially faster escape loop, while other engines get a portable build with identical output. Every optimization is validated by a benchmark harness (bench/) that measures real user views in Chrome, checks output pixel-for-pixel, and records each experiment, shipped or rejected, in bench/LOG.md.

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.

more like this

anne-key

Firmware for Anne Pro Keyboard written in Rust

Rust572

TachiSnap

TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…

HTML50

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags