This is an ambigram by Scott Kim, vectorized by Miles Steele, cleaned up by Dan Lewis, and put inside an OpenLaszlo application. (If you don’t see it, click here.)
Categories
Tags
Archives
- February 2011
- October 2008
- September 2008
- May 2008
- April 2008
- February 2008
- January 2008
- December 2007
- November 2007
- August 2007
- July 2007
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- April 2005
- March 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- April 2004
- March 2004
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
2 Comments
Isn’t Scott Kim one of the people interviewed in Programmers at Work? Cool.
Mind giving a few details on how you implemented this?
Thanks! It’s an OpenLaszlo application; the core looks like this:
[code language="xml"]
function spin() { rotor.animate('rotation', 180, 1500, true) }
[/code]
classdefines a view that’s scaled to the canvas size and that embeds a Flash movie of the image. The three levels of view hierarchy are because ‘rotation’ is relative to the origin (the upper left corner); thex@ and @yoninnerplace the center of the image at the origin of the rotor, and thex@ and @yonouterplace the origin of the rotor at the center of the canvas. With matrices you rotate around a point by sandwiching the rotation between a translation and its inverse; instead I represent each transformation as a view and let the rendering engine do this, so that I can animate therotationattribute and let the animation system handle the rest.To get the shadow, move the
x@ and @yfrominnerto the definition ofoflipin the code above, and then make two more copies ofoflipright aboverotor. An interval timer copies the rotations frominner->s1@ -> @s2on each frame.[code language="xml"]
[/code]
Mouse tracking uses
Math.atan2and the mouse position relative toouter. Motion blur animates the blur effect’s blur radius up to 4 when the image is spinning and back down to 0 when it stops. Both of these piggy-back on the same interval timer that makes the shadow. I tried to turn off the effects when the frame rate got slow, but I don’t think this worked, and I ran out of time.