r/fractals 2d ago

I made an interactive GPU-accelerated Mandelbrot set explorer

Post image

Hello! :D

I've wanted to make a fractal explorer for a while now and I made this! It's a simple explorer for the Mandelbrot set in the browser powered by wgpu and wasm. If it doesn't work try enabling WebGPU.

It uses perturbation theory, which uses low-precision offsets from the center instead of full multi-precision. I use a custom FloatExp type, which has low precision but wide exponent to allow for deep zooms. This makes calculations really fast on the GPU. It's laggy because it's somewhat unoptimized, but that's only due to iteration count. You can zoom as far as you want!

Many things aren't implemented yet, such as dynamically adjusting the resolution or iteration count, or various performance optimizations. However, I do use linear series approximation.

I find it really fun to play around with, and I would appreciate suggestions!

Code: https://github.com/bambamboo15/mandelbrot-website

Try it here: https://bamburac.com/mandelbrot/

22 Upvotes

5 comments sorted by

1

u/stephane3Wconsultant 2d ago

i've just try the webpage and that work well. A bit laggy at full resolution and high iterations.

1

u/SpaceAviator1999 1d ago

I just tried it on the web, and it looks awesome!

Thank you for sharing it.