README - Hinge
~ tutorial
Toolkits demonstrated: Dynamics
last updated: July 20, 2000


Overview:

Demonstrates a hinge joint powered by a limited-force motor. 


Discussion:

A body is connected to the world with a hinge joint. Alternatively,
by running "hinge 2", two bodies are connected to each other by a 
hinge joint.  In either case, the hinge can be motorized and you 
can set rotational limits.

The limits can either be "hard" (if the limit stiffness factor is 
high) or "soft". In terms of the simulation, a hard bounce reverses
the bodies' angular velocities in a single timestep, while a soft 
bounce may take many timesteps to complete.  If the limits are soft,
you can also set their damping so that, beyond the limits, the hinge
behaves like a damped spring.  If the limits are hard, you can 
instead set the limit restitution between zero and one to govern the
 loss of angular momentum as the bodies rebound.

Note that the angular velocity damping toggled by the 'd' key is 
applied directly to the hinged bodies.  This damping is completely
independent of the angular limits.

With the exception of their position and orientation, the bodies in
this example are initialised with default properties.  Their masses
are thus 1 unit (kg).  The second body, if present, is rotated by 90
degrees about the y-axis: this is done purely to demonstrate that a
hinge joint does not require the two attached bodies to have 
identical initial orientation.


Hardware requirements:

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



Keyboard controls:

Key             Playstation 2           Action
----------------------------------------------
<Space>         Circle                  toggles the motor on and off
t               Square                  toggles the angular limits on and off
d               Cross                   toggles the angular velocity damping
                                        on and off
s               Triangle                switches the direction of the motor
z               Down                    decreases the desired angular velocity
                                        by 1 radian per second
x               Up                      increases the desired angular velocity
                                        by 1 radian per second
m               Left                    decreases maximum motor force
                                        by 1 Newton
k               Right                   increases maximum motor force
                                        by 1 Newton
i               -                       reset the limit stiffness to maximum
o               -                       clear the limit stiffness to zero
p               -                       increases the limit stiffness
                                        by 1 Newton per radian
l               -                       decreases the limit stiffness
                                        by 1 Newton per radian
j               -                       increases the limit damping
                                        by 1 Newton second per radian
h               -                       decreases the limit damping
                                        by 1 Newton second per radian
q               -                       increase the limit restitution by 0.01
a               -                       decrease the limit restitution by 0.01


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


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
