Our fabulous Russian Software Consultant, Vsevolod Leonov ("Seva") has posted a video on YouTube that shows a Delphi XE2 FireMonkey 3D animated Caterpillar moving across the screen. The animated caterpiller was built with FireMonkey 3D spheres, animations and 3 lines of code!!! According to Seva, "Three lines were necessary, as the caterpillar motion is not fully cyclic, the head moves in dash-dot manner.
You can find Seva’s blog post in Russian at http://blogs.embarcadero.com/vsevolodleonov/2012/06/28/catarpillar-3d-animation/. Using Google Translate, here is part of the blog post in English:
"I wanted to do without any coding, but then still had to write three lines. I think you can easily recreate the algorithm tracks the movement. Poobuchatsya in this example is quite interesting, there are several ways to implement the motion. Little need to smash his head on how the ball is moving around any. If you try to save students from working with components TFloatAnimation, it is possible to do so. Each ball numbered digits, add the panel to the setting angles. Then you can use in the understanding of the relative motion, to replace the balls into cubes, etc. You can not do one, but several tracks. Then, by varying the kinematic parameters to increase stride length."
The YouTube video is at http://youtube.googleapis.com/v/L2KEc8p6mLI
The project source code can be downloaded from http://embt.ru/catarpillar.zip
The bitmaps below show the form designer with the 3D Sphere components and a TLight component (LightType property set to ltDirectional)
The following image shows the Structure View for the FireMonkey 3D form containing a TDummy, TLight, 9 Spheres and 8 FloatAnimation components for the Caterpillar:
Here are the three lines of code:
Way to go Seva!!!