README - BallHitsWall3
~ tutorial
Toolkits demonstrated: Collision and Dynamics
last updated: June 22, 2000


Overview:

Shows how small changes to BallHitsWall2 achieves dramatically 
different behavior. The first example is pre-compiled and 
ready to execute. The variations below are generated by 
performing small macro replacements directly in the program 
code. You need only perform these simple edits and recompile 
to obtain an executable.


Hardware requirements:

PII 300MHz, 3d acceleration
Windows98 / Win2000 / WinNT / Linux / Irix / Playstation2


Keyboard controls:

Key             Playstation 2           Action
---------------------------------------------
<Enter>         Start                   reset the simulation
<Space>         Square                  throw the ball



This program uses the MathEngine Viewer. Please see the MathEngine Viewer 
Developer's Guide for more information if desired. Controls are:

Key                     Action
------------------------------
cursors                 move camera
ctrl+cursors            move light
F1                      Application-specific Help
F2                      change shade model
F3                      toggle texture
F4                      toggle axis display
F5                      toggle stats display
F6                      toggle text
F7                      toggle camera info
F8                      toggle display lists
F9                      toggle fullscreen
F10                     toggle pause
F11                     toggle mouse manipulation
F12                     toggle renderer help
<Esc>                   quit


Mouse Controls:

Mouse controls          Action
------------------------------
drag in center          orbit camera
drag near left edge     pan camera up/down
drag near bottom edge   pan camera left/right
drag near right edge    pan camera towards/away
drag near top edge      zoom camera in/out
SHIFT + pick graphic    translate object left/right and up/down
CTRL + pick graphic     translate object towards/away
ALT + pick graphic      rotate object


Discussion:

Changing a Ball to a Box:

By changing one line of code, the bouncing ball becomes a 
spinning-and-tumbling box undergoing realistic collisions 
with the wall and floor.

The complexity of program code increases only linearly 
with each additional projectile (just duplicate the code 
that created the first ball) although the number of 
collision interactions that are being handled increases 
quadratically. 


Changing the Dynamics:

The above variation demonstrates the ease with which 
geometrical properties can be modified to produce 
dramatically different results. This involves simple changes 
to the code that uses the Collision Toolkit. 

The following two variations also begin with the code of 
BallHitsWall2.c, but produce dramatically different results 
by applying small changes to the dynamical specification. 
This time, the simple changes involve code that uses the 
Dynamics Toolkit.

Demolition Ball:

A single-line code change replaces ball-bounces-off-wall with 
ball-knocks-over-wall! 

Door Swing:

You can stop the wall from falling over by fixing it the floor 
with a hinge joint. Now when the heavy ball hits, the wall acts 
like a door, swinging around. Since there are no other 
contraints, it swings all the way around (360 degrees), coming 
back to hit the ball again.


Please direct any questions or comments regarding MathEngine 
Example Programs and Tutorials to support@mathengine.com .

======================================================================

(c) Copyright MathEngine PLC 2000. All rights reserved. 

Printed in Canada.

http://www.mathengine.com
