Ray Tracing

November 19, 2009

Ever feel the need to make your browser squeel like a piggy? Well do I have the page for you. The other day a friend of mine pointed me to jQuery. I had never used the stuff before, but it sure looked damned cool. So I started thinking about what kind of web project I could come up with. Well my first couple of ideas seemed neat, but they where pretty graphics intensive, sort of the wrong job for the tool. Another buddy of mine suggested that if I wanted to do graphics on the web I should check out the new canvas tag. Heard of this one yet? It’s a new HTML5 thing, gives you a drawing context to paint directly on the browser from javascript. In of itself it’s kind of a fun toy, but the cooler thing is they’re looking at making a 3D version at some point. So basically your web browser is now just the blank slate where web pages can run apps for you. Multics anyone? It’s a good thing this is all gonna happen with javascript, cause I’d hate for it to be a slow language or anything.

Anyway, armed with a canvas, some jQuery, and a hatred for client side web programming, I decided to whip up a little ray tracer. Here’s some output:

It’s slow as hell, and it only makes balls, but what the heck, it was kind of fun. Feel free to give it a spin:
The Client Render Farm

posted by james wells at 4:30 pm