The Mathematica Journal
Departments
Feature Articles
Columns
New Products
New Publications
Classifieds
Calendar
News Bulletins
Mailbox
Letters
Write Us
About the Journal
Staff and Contributors
Submissions
Subscriptions
Advertising
Back Issues
Home
Download this Issue

The Animation

The graphic elements we have defined to this point are combined in the function lugeworld. Since a good luge rider will anticipate corners and steer before entering the corner, we will shift the leg roll angle forward in time 100 milliseconds. The leg roll angle is taken as 40% of the roll angle of the luge.

[Graphics:../Images/index_gr_97.gif]

One frame of the animation is generated by the function showluge. Since a good luge rider will anticipate corners and look ahead, we will shift the yaw angle forward in time 30 milliseconds. Similarly, the slider damps pitching motion by bending his neck. We capture this by reducing the camera's pitch motion by 20%. The roll motion is completely omitted from the animation. While it may be more realistic, when one is sitting at one's motionless computer monitor, it is just disorienting. A blue background color is specified to suggest sky.

[Graphics:../Images/index_gr_98.gif]

A viewpoint located close to the front clipping plane will give a small viewport and a wide field of view. Since the slider's legs are always close to the viewport, we will choose a viewpoint close to the front clipping plane.

[Graphics:../Images/index_gr_99.gif]

The luge world has a depth of 300 feet so we will set the rear clipping plane at 700 feet to allow rotation and some margin.

[Graphics:../Images/index_gr_100.gif]

A zoom factor of .85 is used.

[Graphics:../Images/index_gr_101.gif]

Here is one frame of the luge ride.

[Graphics:../Images/index_gr_102.gif]

[Graphics:../Images/index_gr_103.gif]

The function lugeride generates the complete animation with nf frames.

[Graphics:../Images/index_gr_104.gif]

A minimum of 24 frames is recommended for a smooth animation.

[Graphics:../Images/index_gr_105.gif]

On machines with limited memory, some steps can be taken to reduce the byte count. The tree can be omitted without seriously changing the animation. The track owns most of the polygons so the biggest gain can be obtained by lowering the resolution (PlotPoints) of this element. Omitting the track color function and using a fixed color (with editgr) will also significantly reduce memory consumption as every polygon will not be preceded by a color directive.

If you are willing to trade execution time to reduce memory loading, you can use Clip3D on all six sides of the view volume rather than just the front clipping plane. In [1] Wickham-Jones shows an example of clipping multiple planes.


Converted by Mathematica      

[Article Index] [Prev Page][Next Page]