SWINGING IPOD SIMULATION
Donna Samuel
CMPS 161 Visualization and
Animation Winter 2010
What went wrong
.
Initially, my idea was to implement the Hookes Law of
Spring Force. This involves another method of calculation and involves another
coefficient called the damping coefficient.
However, when I implemented this model, the body of the rope became too
rigid and bent in a zig-zag manner. As a result, it
does not look naturally like a rope. Thus, I left out the damping coefficient
and retain just the stiffness coefficient to calculate the spring force between
two atoms.
Ipod showing rigidity of cord when hookes spring force is applied
EXTRA FEATURE : YOU CAN CLICK ON THE IPOD TO PLAY MUSIC! In addition , press 'D' to hold a concert!
Rope
coefficients
·
1
: Increase stickiness coefficient
·
2
: Decrease stickiness coefficient
·
3
: Increase spring restlength
·
4
: Decrease spring restlength
·
5
: Increase air friction
·
6
: Decrease air friction
·
7
: Increase stiffness coefficient
·
8
: Decrease stiffness coefficient
·
9
: Increase time step
·
0
: Decrease time step
·
[
: Increase dampness coefficient
·
]
: Decrease dampness coefficient
Rope
Controls
·
w:
Move rope in position z-direction
·
s
: Move rope in negative z-direction
·
a:
Move rope in position x-direction
·
d
: Move rope in negative x-direction
·
q:
Move rope in position y-direction
·
e
: Move rope in negative y-direction
·
n
: Look up
·
m
: Look down
Game
Controls
·
D :
See Michael Jackson dance!
·
Up
: Move forward
·
Down
: Move backward
·
Left
: Rotate Left
·
Right
: Rotate Right
·
p
: Pause
Mouse Control
You can click to select any of the coefficient
on the top right hand corner. Move left to decrease value while move right to
increase.
References:
1. Nehe Productions Lesson 40 , http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=40
2. Game
Developing Community Network, http://www.allegro.cc/forums/thread/588302/624300
3. Wikipedia
Quaternions, http://en.wikipedia.org/wiki/Quaternion
Video of the ipod and the dancing men