a fractal is much more fun when you can zoom<p><a href="http://calvinmetcalf.github.io/leaflet-fractal/#255/-0.37/0.6/mandlebrot/2/-17.5/-86.1" rel="nofollow">http://calvinmetcalf.github.io/leaflet-fractal/#255/-0.37/0....</a><p>course that's MUCH more then 25 lines
The next step is smooth coloring. I've written a post explaining it here: <a href="https://csl.name/post/mandelbrot-rendering/" rel="nofollow">https://csl.name/post/mandelbrot-rendering/</a><p>The js code can be tested on <a href="https://csl.name/mandelbrot" rel="nofollow">https://csl.name/mandelbrot</a>
Such a small code snippet! I wrote coloring using the triangle inequality in JS a couple years ago for someone on reddit:<p><a href="http://codepen.io/anon/pen/Ircav" rel="nofollow">http://codepen.io/anon/pen/Ircav</a><p>Amazing that we can write these things up so quickly in a browser.
Nice writeup.<p>I did a mandelbrot viewer in javascript like 5 years ago. In fact, it was the only thing I ever wrote in Javascript besides dom manipulation crap. I wanted to try the canvas tag when it was first introduced, and this was the first project that came to mind. My version had color and let you click on the image to zoom. After about 20 clicks, it would run out of precision and the pixels would turn into larger and larger blocks. It was also slow as dirt back then. I'd bet it would probably run pretty good nowadays.
Here is another one. click to zoom. modify hash for antialiasing and higher iteration count.<p><a href="http://jonathan-potter.github.io/Mandelbrot/" rel="nofollow">http://jonathan-potter.github.io/Mandelbrot/</a>