Skip to main content
100%

Mandelbrot

✓ Published2🌍 Public
KKristin Baumann
Last edited Apr 23, 2024
Created on Apr 23, 2024

This interactive visualization computes and renders the Mandelbrot set as a static canvas image. The code iterates through each pixel, applying a mathematical formula to determine whether points in the complex plane diverge or remain bounded, coloring each point based on the iteration count. It uses a gray-scale gradient, with darker values for points that escape quickly and black for those within the set. Rendering is handled through a custom Svelte Canvas component, which registers individual drawing functions for each pixel, using the Canvas 2D API’s `fillRect` method. The computation logic is adapted from The Coding Train’s tutorial on the Mandelbrot set.

AI-generated description

Math from The Coding Train: https://www.youtube.com/watch?v=6z7GQewK-Ks

MIT Licensed

Similar vizzes