rosslh / Mandelbrot.site

✨ A web app that lets you explore the Mandelbrot set fractal. Built with Rust (compiled to Wasm) and TypeScript.
https://mandelbrot.site
Other
82 stars 9 forks source link
fractal leaflet mandelbrot mandelbrot-set rust typescript visualization wasm webassembly webworker

Mandelbrot.site icon

Mandelbrot.site

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.

GitHub branch check runs Uptime Robot status Uptime Robot ratio (30 days)

Features

Mandelbrot.site offers a variety of features to enhance your experience:

Gallery

Explore some stunning images generated with Mandelbrot.site:

Mandelbrot Example 1 Mandelbrot Example 2

Explore more images

Architecture

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.

Development

This project requires Node.js to be installed on your system. Check the .nvmrc file for the recommended Node.js version.

Commands

To set up and run the project on your local environment, navigate to the client directory and use the following commands.

Project Structure

Contributors

Many thanks to the following contributors who have helped shape this project:

Avatar 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!