Julia meets HTML5
Tuesday, 01 February 2011

Fractals are always fun but Google has a web page where fractals combine with HTML5 to give a fully interactive viewer that uses nothing but JavaScript and as many cores as you care to offer it. The shape of things to come ...

Although some of the newness has worn off HTML5, it still fun to do things with. Google Labs has created a site that shows just how more you can do with it. The basic idea of fractals is well known to most programmers but this doesn't mean that it isn't still a challenge to create a fractal plotting app that looks good and produces results in realtime.

 

fractal2

 

Julia Map uses HTML5 to plot a range of Julia sets corresponding to different equations that the user can select from a drop down list. The user can also select the color scheme. The display is achieved using the HTML5 canvas object which is an obvious enough application but Google say that not only have they used the Canvas model but the Google Maps API to provide the zoom and pan facilities.

If you play with the example it quickly becomes apparent that it has the same feel as Google maps - the difference is, of course that every pixel is being computed live in the browser. This is speeded up by the use of web workers, another really handy HTML5-ish feature. This brings threading to web pages and spreads the workload across any cores that might be available. If you monitor the CPU load while using the page you might be surprised at just how much the load goes up when you zoom or pan to a new location.  There also a flop counter in the top left that gives you an idea of how many floating point operations are being performed. Overall the performance is impressive.

 

fractal1

This is a fractal viewer implemented using nothing but JavaScript and some new HTML5 features and it shows what can be done without the help of any plugins. Although it hasn't been provided you can view the source of the JavaScript by the usual methods of downloading it from the same URL as the web page used. The sad news is that its been compressed and there doesn't seem to be a formatted version on offer - this a shame because the educational value would be so much higher with source code. You have to wonder what it is that Google labs is trying to achieve here.

If you want to explore an alternative fractal zoomer click here for one implemented in Silverlight.

More Information

Julia Map

Further reading

Fractals

Silverlight Mandelbrot Zoomer

Mandelbrot Zoomer in WPF

Fractal Image Compression

Chaos

 

Banner


NFC For Man's Best Friend
01/04/2014

Barclalycard has unveiled plans for PayWag, a payment chip that is discretely embedded into a dog's collar to allow it make small purchases. Does it mean you can stay in bed while the dog collects, an [ ... ]



TypeScript 1.0 Released
04/04/2014

Microsoft announced the release of TypeScript 1.0 at the BUILD developer conference and is now taking pull requests for bug fixes, improving documentation and "general cleanup".


More News

vqaiwv@srofar.com
Last Updated ( Tuesday, 01 February 2011 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.