Julia Meets HTML5
mikejuk writes "Google labs has created a demo 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 and not a plug-in in sight."
So why not hyperlink "Julia sets" to something telling us wtf a Julia set is?
htm5 schmaTML5. I wrote a fractal viewer in TeX, in 1995. How's that for useless? http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=mandel
Here's the link to Google Labs' . Also, there's an obvious typo in the summary title. I'm unhappy with Slashdot lately.
"Google labs has created"... I think not. Actually I suspect talented people have created. How about their names?
Or have they been totally borged?
People create. Corporations monetize.
Here's the link to Google Labs' Julia Map. Also, there's an obvious typo in the summary title. I'm unhappy with Slashdot lately.
Maybe some alternative Italian spelling?
The canvas tag is a part of the HTML5 spec. So it is an HTML5 application.
It's nice, although not as quick as all that on my machine.
But what does this demonstrate? Anyone interested knows you can display arbitrary graphics using HTML5 canvas. Anyone with any sense knows you can calculate a view of a Julia set in Javascript. Add the two together, and it's inevitable that this demo would be possible.
Now, how about using Web sockets to set up some kind of P2P network whereby if someone else is viewing the same region as you are, your machines collaborate on the calculations...
The HTML demo is here.
In other new, /. editors still fail the Turing test.
One of the first things I ran on my shiny-new Commodore Amiga in 1985.
"I disapprove of what you say, but I will defend to the death your right to say it." - historian Evelyn Beatrice Hall
Almost as slow as the new slashdot interface!
Either this is getting slashdotted and causing something to run slowly or what should be javascript running locally on my
dmesg | grep CPU0:
CPU0: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ stepping 01
is slower than my old 486 at rendering a mandelbrot.
I wrote my own viewer on an archimedes for a school project over 14 years ago and it was faster than this.
Any clues?
Or is this proof that browsers and scripts are only good for GUI and not actual processing?
...it's neat. Nothing more, nothing less.
Here's a wacky idea: a link that is (a) not slashdotted, and (b) not to a blog posting.
Google Labs
Julia would be "Giulia" in Italian. Juilia is plain wrong.
And It performs awesomely! They need to stop smoking the banana peels and put the javascript down.
Tiger Blooded Bi-Winning Machine
Just Google it, there are various years old implementations! http://blog.nihilogic.dk/2008/10/23-pretty-javascript-fractals.html
The demo is pretty; but Not Fast, even in the latest chrome on a dual-core A64. Not going to try it in FF on the netbook...
It takes me back to the old days, of my misspent youth, when we grabbed somebody's Postscript fractal generator demo, set the number of iterations to something dubiously suitable to even the desktops of the time(it worked; but took about ten minutes) and then sent it to every postscript-capable printer we could locate across our school's network...
Thank god for silverlight, this html5/javascript shit runs like crap.
Maybe its time to upgrade from IE6. Seriously it runs well in Firefox and Chrome
I hate to say it, but javascript and canvas are disappointingly slow. XaoS is dozens of times faster than this, and while I'm sure a lot of it is to do with specific fractal optimisations, surely a significant factor is the slowness of pixel operations and drawing images.
I'm writing an HTML5 game, and simply drawing an image that fills the screen (with no resampling) brings you down to about 50 fps. A few more small images, some resizing later and I'm into the 30 fps realm, and that's on a really fast computer using Chrome.
Excellent demo though :)
[John]
Shit better not happen!
The boobs are at zoom level 450 or so.
Remember to maintain your supply of
I got nothing. Lame IE8 here at work and Julia Map opens to a big blank screen with a grabber hand...nuthin'.
If it doesn't "just work" it won't gain traction.
Oh, a fractal viewer. Or more specifically, a Julia set viewer.
Would have been nice to know what sort of a viewer this was by the summary. After all, it's not like there are other things named Julia or that fractals have been used for other types of viewers.
Exactly. This is why the "application" is a bad idea. I understand the goal of moving "heavy lifting" to the cloud and having "thin" clients. However, it appears that the "thin" client envisioned here is a machine that parses and interprets lots and lots of text. It's so inefficient and wasteful. As a hardware designer, we keep making mobile devices more powerful and energy efficient all so lazy programmers can throw steaming piles of crap onto the devices. It's a hack on top of a hack on top of a hack. Some sort of binary protocol where minimal bytes are passed between server and client is needed here.
Intel transfer the difficult from Hadware to software, for get more power, programmer need more technology. -- chinaitn
It only goes to a zoom level of 50. Hmm!
America, Home of the Brave.
Supposed to say HTML "application".
Intel transfer the difficult from Hadware to software, for get more power, programmer need more technology. -- chinaitn
Instead of trying so hard to optimize JavaScript to do things like that, why can't we just get a wider language choice? Like, a properly sandboxed language with static typing could be handy, and the standard could mandate its presence. Everybody would get a compatible browser eventually, if it allowed them to run web apps that are actually fast.
It doesn't work past about zoom level 48-50. Fractals aren't supposed to have bottoms.
Our Real-World HTML5 Benchmark at ClubCompy had a Julia set running in the browser a full month ago!
It's not a fair comparison though that they're so much faster than us, our code runs out of a BASIC-like language called Tasty that runs ATOP JavaScript.
I disagree. It runs pretty poorly. I use Chrome.
-]Phreak Out[-
What's the point of the canvas tag without an API?
Don't thank God, thank a doctor!
So let's see...
No, the goal isn't moving "heavy lifting" into the cloud. The advantages of a web application are portability and storage on someone else's servers -- exactly the same advantages that Gmail has always had, and Hotmail had before Gmail.
The goal of pushing what HTML can do is to keep the advantages of the Web, but also bring the advantages of a fat client -- lower bandwidth, less server resources, and clients which use more resources, but also do more with them.
And the point of text is to make it transparent.
I don't see "laziness" anywhere -- in fact, as a hardware designer, I somehow doubt you have any idea what it takes to be a really good web developer. It's true, I don't have to worry about manual garbage collection, let alone voltages, heat, and all the other messiness of the hardware world, and I'm grateful that you take care of that. What I do need is a working knowledge of HTML, XML, CSS, JavaScript, HTTP, and all the different browser quirks involved in implementing that, in addition to some basic graphical editing skills, and on the server side I likely need at least one application language (Ruby, Java, .NET, whatever) along with at least one external DSL the database speaks (SQL). In order to synthesize these into a functioning application, I should also be familiar with the principles of REST, I can't really avoid SOAP as much as I'd like to, and I also have to think about OAuth and security in general (some security issues which don't even apply to standalone apps), HTTPS, HTTP Push (web sockets, comet, etc), how browsers handle caching, and random accumulated tricks of the trade, like CSS "sprites", JavaScript minification, better make sure we turn on gzip compression in the webserver...
This isn't meant to be me whining that my job is so hard, or even that it's necessarily harder than other application platforms -- I like to think it's easier. The point is that people don't make web apps out of "laziness" -- if laziness was truly a factor, I'd make a commandline app, throw it up as a source tarball, and say "You figure it out," and I will admit to doing that when I can't justify putting the effort in to making it usable.
No, the reason I'd make a web app is that I want something people can just use by typing a URL from any computer with a decent browser, without worrying about installing something, without needing to manage keeping their data backed up and synced across computers, and without forcing me to support some OSes and platforms and abandon others.
As for "inefficient and wasteful", sure, there's room for improvement, but have you done an honest comparison between modern JavaScript engines and other VMs? Or are you seriously suggesting that all apps, especially mobile apps, should be written in a language where buffer overruns are still a very real possibility? Because I'll take a little reduced battery life in exchange for stability, and especially from the improved battery life by avoiding some malware.
Don't thank God, thank a doctor!
Do you have a comparable Flash fractal viewer that performs better?
Don't thank God, thank a doctor!
Well this is progress, this one manages to max-out my quadcore machine AND be slower than 'fractint' was on my "turbo-XT" :-)
Chrome seemed to be running at least five or six independent processes. I only have two cores to test it with, though...
Also, while I doubt it has much of an effect, keep in mind that all major Windows browsers are 32-bit right now, mostly because Flash is 32-bit, which means the browsers are 32-bit, which means Silverlight is 32-bit, which means the browsers are 32-bit... My Chrome is 64-bit, but it can run a 32-bit Flash. Since this is native JS, it'll actually run in 64-bit mode.
Don't thank God, thank a doctor!
First hit when googling "Flash Fractal Viewer"
http://www.felinesoft.com/blog/index.php/2010/10/mandelbrot-fractal-viewer-in-flash-actionscript-3/
for me faster by about a factor of 3, plus MUCH smoother even when only using a single core.
HI O WISE PRINCE. WHT TOOK U SO DAM LONG?
Go here: http://mandelbrot.is.rly.gd/
I created this a couple years ago to explore custom rendering of tiles on Google Maps. Neat that they're doing it all in JS - my version is entirely rendered server-side!
That's 0.01% of the computing power of my machine.
When I set it to the same resolution, I got similar results. The only real disadvantage of the Google viewer was the fact that it was burning both cores.
I noticed a few other things, also -- the Google viewer was much, much easier to play with. I could drag it around (like Google Maps), I didn't have to wait for it to finish rendering before I could zoom further, it seemed to render in chunks. The Flash viewer was eventually faster once I got deep enough, but before then, it was pretty comparable, except it would zoom first, then start rendering, and become entirely unusable during the entire rendering process.
That doesn't tell me Flash is faster than JavaScript, especially when ActionScript's Tamarin engine isn't terribly different than modern JavaScript engines (and is capable of running JavaScript also). Instead, what it tells me is that these are very different implementations with different characteristics, which makes comparison difficult.
Don't thank God, thank a doctor!
Chrome used 5 cores on my 8-core Mac Pro (early 2008 model). I had 5 "Google Chrome Worker" tasks running.
Still not "as many cores as you can give it"...
in FF 3.6 it is dog slow... in Google Chrome 10 it is passable.
That 7 MHz 68000 CPU rendered a lot faster than my quad core Phenom does today.
Great, now I can render the Mandelbrot set on my dual-core 4800+ box nearly as fast as I could on my 386 with FractInt.
I wish I was kidding, but if this is a representative demo of HTML5 then we're in trouble.
"Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife