Try It! Animating a Shape
Animated shapes add realism to a scene: you can watch the throat of a
frog expand and contract as he breathes, and you can see a bouncing
rubber ball flatten slightly when it hits the ground. The technique for
animating a shape is similar to the technique for animating the
movements of an object: you move the time marker in the keyframe
animator to the appropriate time, change the points, edges, or polygons
of a PEP object, and then record the keyframe.
Click here to preview an animation similar to the
one you're about to create.

If a PEP object has a shape animation associated with it, you won't be
able to use any of the PEP editing tools to split polygons or delete
polygons from the shape. If you try to alter the number of points in an
animated shape, the following message appears:

Be sure to make all changes to the topology of your shape before you
begin recording the animation.
Reminder: Use Edit > Undo (Ctrl + Z) and Edit
> Redo (Shift + Ctrl + Z) in the main window to undo and
redo changes made in the Keyframe Animator as well as changes made in
the main window. The Keyframe Animator uses the same undo buffer as the
main application.
Animating a Simple Shape
Follow these steps to set up the animation:
-
In Cosmo Worlds, open the sample file /usr/share/Insight/library/SGI_bookshelves/Help/books/CosmoWorlds_UG/Models/frog.wrl
If you were going to edit a primitive object such as a sphere,
you'd need to click the Convert to PEP Object button: 
The frog is already a PEP object, so the PEP hammer is grayed out.
-
Click the PEP Editor button:

A dialog box appears asking you to select a child. Dismiss the box and
then click the Select Child down arrow to select the bottom
half of the frog's body. Click the PEP Editor button; an orange box
appears to indicate PEP editing mode.
-
Start the Keyframe Animator by clicking its button:

-
Choose Animation > New animation. Then choose Animation
> Change name and type in a name for your animation: myfrog.
-
Add the frog as a member of the animation by choosing Animation
> Add member.
-
Choose Animation > Set duration and set the duration to
10 frames.
Now you're ready to animate the shape:
-
Move the current time marker (the red triangle) in the Keyframe
Animator to frame 5.
-
In the main window, Shift-click to select the polygons that form the
throat of the frog, as shown in the figure below.

-
Click-drag the selection to expand the frog's throat. (To get a better
angle, hold down the Alt key to switch temporarily to the
Examiner Viewer so that you can rotate the frog.)
If you press the Ctrl key when you click-drag, you can pull
out the vertices in a direction perpendicular to the surface of the
frog's throat.
-
In the Keyframe Animator, click the master Record button to record the
keyframe.
-
Move the current time marker to frame 10.
-
In the main window, click-drag the frog's throat to its original
position (or simply copy and paste the keys
from frame 0 to frame 10).
-
Click the master Record button to record the keyframe.
-
In the Keyframe Animator, click the Play arrow to preview
the animation.
Jump to: