🌍 Public
Viewing a saved revision (read-only)
24a5e85a43aa49d9bf48d14a1d1a3a62
Colored Mandelbrot with P5.js
This example renders an interactive Mandelbrot set fractal using the p5.js library, with a custom color palette applied to the escape-time values. The visualization iterates over every pixel in the canvas, mapping coordinates to the complex plane and testing how quickly each point diverges under the z = z² + c formula. Instead of grayscale, the code assigns vibrant RGB values derived from the iteration count, producing psychedelic gradients within the fractal’s basin. It uses p5’s `loadPixels`, `updatePixels`, and `map` functions to manipulate the pixel array directly.
AI-generated descriptionThe P5JS example: Mandelbrot Set.
Modified to make some fancy colors!