|
The world is made up of 'Atoms' and 'Rods'. An atom is a point
mass that has mass, position and velocity. A rod connects two atoms and has
natural length, youngs modulus (spring stiffness), damping and an atom at each
end.
When you enter this page or press refresh (because you lost the ball), the world contains some test objects: a 'pencil', a 'ball' and and a grid so that you can see the ground.
The 'pencil' consists of two 1kg atoms connected by a 1m rod. It falls and
hits the ground, bounces a bit then settles in an upright position. It does not
fall over because the top atom is precisely above the bottom. If you move it in
pick-up mode you will never get it to balance like this again!
The 'ball' is actually a dodecahedron made of 20 1kg atoms connected by rods of various length. The rods not only connect the edges but also cross-brace the ball so that it springs into shape. As the scene starts it falls and bounces.
The only colisions that can occur are when atoms hits the ground (z <=
0). The atoms themselves have totally inelastic colisions. Objects bounce
because, as they land, the rods convert kinetic energy into spring compression
causing the top atoms to stop and reverse with sifficient momentum to pull the
whole object back off the ground.
Rod colour indicates strain. Compression is red, tension is green. Look at a
resting ball; its equator rods is in tension as is bulges but other rods are in
compression.
I would like to develop this applet further. If I ever get the
time these
are some of the things on my wish list:
I originally wrote the Physics simulator as an exercise to lean Java
programming. Since it was kind of fun I decided to put it on the web.
I hope you like it.