Mandelbrot.site is an interactive fractal viewer that runs in the browser. It offers a fast and intuitive way to explore the Mandelbrot set and share your discoveries. Built with Rust, WebAssembly, TypeScript, and Leaflet.js.
Mandelbrot.site offers a variety of features to enhance your experience:
Explore some stunning images generated with Mandelbrot.site:
Mandelbrot.site is built using modern web technologies to deliver a high-performance, interactive tool for exploring fractals. The computational backend is implemented in Rust, chosen for its performance and safety features. This Rust code is compiled to WebAssembly (Wasm) using the wasm-pack plugin, enabling high-speed computations directly in the browser. On the frontend, the user interface is crafted with TypeScript, enhancing code quality and maintainability. Leaflet.js is creatively adapted to render the Mandelbrot set tiles in a zoomable, map-like interface.
For performance optimization, Mandelbrot.site employs Web Workers via the threads.js library. This setup prevents intensive computations from blocking the main browser thread by creating a pool of workers that handle the generation of Mandelbrot set tiles in parallel. A key optimization technique used is "rectangle checking," which saves computation time for areas entirely within the set by checking only the perimeter of a tile.
This robust architecture ensures that Mandelbrot.site provides a seamless and responsive experience for users exploring the intricate details of the Mandelbrot set directly in their web browser.
This project requires Node.js to be installed on your system. Check the .nvmrc
file for the recommended Node.js version.
To set up and run the project on your local environment, navigate to the client
directory and use the following commands.
npm install
npm run build
npm run dev
npm run serve
npm run typecheck
npm run lint
npm run format
npm run test
npm run clean
- removes caches and build artifactsmandelbrot/src/lib.rs
mandelbrot/src/lib_test.rs
client/js/main.ts
Many thanks to the following contributors who have helped shape this project:
Avatar | Name | GitHub Profile |
---|---|---|
Ross Hill | rosslh | |
Joseph Weissman | jweissman | |
Shubhankar Shandilya | shubhankar-shandilya-india |
Want to contribute? Check out the list of open issues!