Online Example::Papervision 3d Figure-8 Path Animation
This example illustrates how to use a closed-loop Catmull-Rom spline to animate square markers along a figure-8 path using Papervision 3D. It was generated using the PV3D 1.5 release. Working with the source code requires a bit of prior knowledge of how to use PV3D with FlexBuilder.
The code builds on the 2D Lemniscate of Bernoulli example. Three splines are used to aproximate figure-8 paths in the XY, XZ, and YZ planes. Arc-length parameterization is used to animate along the path with constant velocity.
Click the 'Animate' button to watch a series of ten markers animate along each of the three paths.
:: Arc-Length Parameterization - Introduction to curve parameterization and how to reparameterize a curve on arc length. Techniques applied to a Catmull-Rom spline. Examples include how to distribute sprites evenly along a curve and path animation (including path following and orientation).
Source Code. Download the Singularity package (this example is in Singularity/demos/P3D/PV3DFigure8.mxml). You must install the PV3D 1.5 code and make sure the Canvas3D.as file is in the org.papervision3d.flex folder. The Figure8.as file must be placed in the org.papervision3d.examples folder.