Circling a Cube in 3D

I put together a simple demo to showcase some of the neat stuff the CFML3D rendering engine is capable of.  The demo isn't much to look at, but what's going on under the hood is pretty cool.

"Wow!", you say, it's wobbly rotating cube with different colored faces.  You'd be wrong.

The cube is stationary, in all it's multicolored glory, two units in every dimension, with it's center at (0, 0, 0).  It's the camera that is rotating around the cube, panning to keep the cube in the center of the view at all times.  It's also slowly zooming in and out and moving up and down as it circles.

If you view source, you can see the animation is nothing more than a series of base64-encoded PNGs that I'm looping through with jQuery to create the animation.  The images are dynamically created; the source is just copy and pasted from a CFM that built it. Since PHP doesn't have the cool language plugging features that CFML servers do (cough…CFGroovy…cough), I had to do it with a static inline of the generated code.

2 responses to “Circling a Cube in 3D”

  1. Brad Wood

    I like.

    Do you have any metrics on performance for this yet? How long does it take to render a few hundred frames?

  2. Josh Knutson

    Ahh I see better what you did their when I disabled javascript to see all the individual frames, very slick