News for hackers. Stuff that matters.
Re:XaoS.js - a real-time fractal zoomer by program on Friday February 03, 2012 @08:53PM (#3549945)
I've seen tons of different Mandelbrot implementations in Javascript and Processing.js (it's a pretty popular example of the ImageData object) and I can say that this particular one is indeed fast considering that is using 128 iterations on a relatively big canvas.
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?
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.

Re:XaoS.js - a real-time fractal zoomer by ninjo on Friday February 03, 2012 @05:52PM (#3549452)
Listen to this while zooming: http://www.youtube.com/watch?v=MWqdO74iApc
Re:XaoS.js - a real-time fractal zoomer by jayferd on Friday February 03, 2012 @02:33PM (#3548503)
awesome. Does get blurry after a while though :(
Re:XaoS.js - a real-time fractal zoomer by eridius on Friday February 03, 2012 @03:26PM (#3548794)
Yeah, I managed to hit the limit where it stopped being fractal. Damn these limited-precision floating point numbers!
Re:XaoS.js - a real-time fractal zoomer by m_for_monkey on Friday February 03, 2012 @03:33PM (#3548830)
No, it's because the maximum number of iterations is too low for that zoom level.
Re:XaoS.js - a real-time fractal zoomer by nkoren on Friday February 03, 2012 @03:41PM (#3548870)
That won't cause it to be "blurry" -- that just causes it to be black. "Blurriness" is indeed due to floating-point errors in the coordinates system.
Re:XaoS.js - a real-time fractal zoomer by m_for_monkey on Friday February 03, 2012 @04:17PM (#3549052)
For me, in the browser, the edges just smooth out to a straight line, and seem blurry only because of the color scheme. In the desktop version, however, I see this when zoomed in maximally: http://i.imgur.com/ryhai.png.
Re:XaoS.js - a real-time fractal zoomer by artursapek on Friday February 03, 2012 @08:00PM (#3549817)
This is what I maxed out at. It did start to look blurry right before it started lagging, and these staggered lines were revealed, but they look much different from yours. http://i.imgur.com/R5PbQ.jpg
Re:XaoS.js - a real-time fractal zoomer by eridius on Friday February 03, 2012 @04:49PM (#3549202)
Ah, fair enough. It's probably the iterations then.
Re:XaoS.js - a real-time fractal zoomer by dustywusty on Friday February 03, 2012 @06:56PM (#3549652)
After a while? Seems like it does it fairly quickly in both directions. Neat concept, though.
Re:XaoS.js - a real-time fractal zoomer by djtriptych on Friday February 03, 2012 @03:37PM (#3548853)
...i'm not sure these guys understand the difference between "fractal" and "not a fractal"
Re:XaoS.js - a real-time fractal zoomer by nkoren on Friday February 03, 2012 @03:39PM (#3548862)
Er... did you mean to leave this comment on some other article? I've seen the term "fractal" misused recently, but this is very much a fractal.
Re:XaoS.js - a real-time fractal zoomer by djtriptych on Friday February 03, 2012 @03:47PM (#3548906)
OK I concede it meets a definition of fractal. I'm recalling having seen Mandelbrot speak at my high school and identify a property of his eponymous set in particular: that no matter how closely you zoom, no part of it ever appears to be a straight line, unlike, for instance, a circle.

I just feel cheated.

But sure, it's a fractal capped at a disappointingly low number of iterations.

Kinda like how an equilateral triangle is a sierpinski's gasket at zero iterations.

Re:XaoS.js - a real-time fractal zoomer by m_for_monkey on Friday February 03, 2012 @03:59PM (#3548969)
Try the desktop version, this is a very limited alpha. But no, not even the desktop version offers unlimited precision.

http://wmi.math.u-szeged.hu/xaos/doku.php