Re:XaoS.js - a real-time fractal zoomer
by pronoiac on Friday February 03, 2012 @04:52PM
(#3549216)
Would using WebGL could give smoother animation or use less CPU?
[ Parent
| on HN ]
Re:XaoS.js - a real-time fractal zoomer
by thristian on Friday February 03, 2012 @08:05PM
(#3549831)
Probably not. The XaoS algorithm depends on nearest-neighbour scaling and recalculating just the interpolated rows/columns. You could do that in a texture then scale the texture to the screen with WebGL, but it probably wouldn't be any more efficient than just doing it in a non-accellerated frame-buffer.
If there was a way to offload the Mandelbrot calculations to the GPU, that might make things faster, depending on how tedious it would be to composite them back onto the framebuffer afterward.
Here's a Mandelbrot zoomer implemented entirely with WebGL:
http://learningwebgl.com/lessons/example01/
It doesn't use the XaoS algorithm, it recalculates the entire frame from scratch on the GPU. On my machine at least, it's noticeably choppier than the XaoS version, and at a smaller frame-size, too.