Viewing a saved revision (read-only)
da672933b13340abb83f4498e17d5e4e
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 CodingTrain: https://www.youtube.com/watch?v=6z7GQewK-Ks