Viewing a saved revision (read-only)
25c8f596fb3644adacfb29e057ad3d44
Mandelbrot
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 descriptionMath from The Coding Train: https://www.youtube.com/watch?v=6z7GQewK-Ks