This repo contains some experiments that I have done while trying out WebGL.
A simple rendering of the Mandelbrot set. Zoom in and out using the mouse wheel. Recenter and zoom in using the left and middle mouse buttons.
Different color mappings are available in the source.
Default view:
Zoomed:
This is a modified example of a metaballs tutorial (see links below). I changed the color of the blobs and added blobs with negative weight.
Here are some links I found useful:
- Tutorial on metaballs and fragment shaders: https://jamie-wong.com/2016/07/06/metaballs-and-webgl/
- Marching squares algorithm: https://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/
- Implementation tips for rendering the Mandelbrot set: https://csl.sublevel3.org/post/mandelbrot-rendering/
- Smooth coloring algorithm for the Mandelbrot set: https://linas.org/art-gallery/escape/smooth.html
- GLSL reference: https://www.shaderific.com/glsl/
- WebGL tutorial (starts from 0): https://learningwebgl.com/
- An old (quite slow) Mandelbrot set renderer based on some .NET code I wrote in high school, unfortunately I have lost the source code. It kind of works in Wine: https://download.cnet.com/The-Mandelbrot-Set/3000-2053_4-10838730.html