An amazing demonstration of the math behind some fractals, which runs on web gl, is Steven Witten's "How to Fold a Julia Fractal"
https://acko.net/blog/how-to-fold-a-julia-fractal/
Highly recommended
https://acko.net/blog/how-to-fold-a-julia-fractal/
Highly recommended
Coding Challenge #21: Mandelbrot Set with p5.js - https://www.youtube.com/watch?v=6z7GQewK-Ks
VEX IN HOUDINI: MANDELBROT AND MANDELBULB - https://www.sidefx.com/tutorials/vex-in-houdini-mandelbrot-a...
The second link is Houdini specific but you should be able to follow along with the free version on win/linux/osx.