impact21.zip
IMPACT Dynamics Simulator 2.1 simulates a 2-D collision.
FILE_ID.DIZ
IMPACT Dynamics Simulator v2.1 Copyright
(c) 1993,1995 John Henckel. Impact
simulates the collision of 2-dimensional
convex polygons with graphical
animation. The equations for collision
of irregularly shaped objects are taken
from "Dynamics" by Pestel and Thomson,
VGA, or Hercules using Borland BGI.
(Help text not readable on Hercules.)
Recommended but not required: mouse and
286 or better.
-----------------------------------------------------------------------------
Tutorial
Experiment 1: Kinetic doodling
Start the program and type "a 2 3 4", this will create two tall tri-
angles. Position the mouse in the middle of the screen and
click button 1. The nearest triangle will move toward the mouse.
Now hold down mouse buttons 1 and 2. All the triangles are drawn
toward the mouse (but not as quickly). Press 't', now as the bodies
move they leave a colorful design behind them. Press 't' to turn off
trace, press 'c' to clear the screen. Press 'd' twice to delete the
bodies.
Experiment 2: Inclined plane
Type "a 1 3 10 2" to make a long incline plane. Type "a 1" to make
a little box. Type "g 5" to enable gravity. Type "r 0.5" to make
things not so bouncy. Now using the mouse, pick up the little box
and set it on the inclined plane. Then watch it slide down.
The Impact program take one command line parameter which is the name
of a scenario file. See notes below for the file format. Some
scenario files are included in this package, for example, type
impact exp1.dat
to load experiment 1 scenario.
------------------------------------------------------------------------
R E L E A S E N O T E S
------------------------------------------------------------------------
1.0 93/11/16 - John Henckel, first release
Room for Improvement:
* The program defines impact as whenever the corner of one body enters
the interior of another body, or enters a wall. This sounds simple
but it has many difficulties. (a) It is possible for two bodies to
overlap, but neither has a corner inside the other, this is very
common with triangles because of their sharp corners. (b) It is
possible for two bodies to each have a corner in the other, in
this case I pick one arbitrarily. (c) It is possible for a body to
hit a wall or another body with two of its corners, in this case I
choose one arbitrarily. There are certainly better ways to handle
these cases.
* When gravity is enabled, one would like to stack objects on top of
one another. This doesn't work though because the acceleration
of gravity is constant, but the acceleration of impact becomes zero
as the bodies slow down. Thus, they slowly mush into each other.
To fix this, I added the 'j' parm for center adjustment factor.
If s=1.0, then after computing the acceleration of impact, the bodies
are separated from each other so that they no longer overlap. This
opens upFiles inside (12)
| CGA.BGI | 6 KB |
| EXP1.DAT | 230 B |
| EXP2.DAT | 204 B |
| FILE_ID.DIZ | 3 KB |
| HERC.BGI | 6 KB |
| IMPACT.C | 29 KB |
| IMPACT.DOC | 10 KB |
| IMPACT.EXE | 103 KB |
| JOINT.DAT | 245 B |
| MOUSE.H | 1 KB |
| PILE.DAT | 81 B |
| TEN.DAT | 31 B |