Hi!
I'd like to present you KineticsKit - A Physics-Based General 3D
Mass-Spring System. It's purely written in Python and has several
example programs included. Just give it a try - you will like it.
Requirements:
-------------
Python 2.0 or higher
VPython available from
http://virtualphoton.pc.cc.cmu.edu/projects/visual/
Objective:
----------
KineticsKit provides some classes to simulate the behaviour of a 3D
mass-spring-system. It can be used to investigate some basic
kinetics, but I
wrote it mostly for the fun of programming it and playing with it.
Usage:
------
First a System has to be generated. The System has several attributes
like
gravity, viscosity and timestep which must be given in the
constructor. Some
of them are mandatory (timestep), the rest of them are optional.
Next Masses are generated and inserted into the System. Masses also
have lots
of attributes like m, pos, if it should be fixed at its initial
location, its
initial velocity and the color. Most of them are implemented as
keyword
arguments and can thus be omitted if they are not used.
After this, the Masses can be connected with Springs. There is no
restriction
in making the connections so one Mass can be connected with several
others.
A Spring needs to know which two Masses it should connect, and its
spring-constant. The rest of the constructor arguments are again
implemented
as keyword arguments, but I recommend to take a look at them. They
are useful
to tense the Spring, specify a damping value or give it a nicer color.
Finally the System has to be started and kept running with an infinite
loop.
Interaction with the system is possible with the mouse. A Mass is
picked by
clicking at it. It can be moved around and the rest of the system
responds to
the movement. To release the Mass the mouse must be clicked again.
"""A Physics-Based General 3D Mass-Spring System.
by Markus Gritsch (gr...@iu...)
Objective:
----------
KineticsKit provides some classes to simulate the behaviour of a 3D
mass-spring-system. It can be used to investigate some basic
kinetics, but I
wrote it mostly for the fun of programming it and playing with it.
Usage:
------
First a System has to be generated. The System has several attributes
like
gravity, viscosity and timestep which must be given in the
constructor. Some
of them are mandatory (timestep), the rest of them are optional.
Next Masses are generated and inserted into the System. Masses also
have lots
of attributes like m, pos, if it should be fixed at its initial
location, its
initial velocity and the color. Most of them are implemented as
keyword
arguments and can thus be omitted if they are not used.
After this, the Masses can be connected with Springs. There is no
restriction
in making the connections so one Mass can be connected with several
others.
A Spring needs to know which two Masses it should connect, and its
spring-constant. The rest of the constructor arguments are again
implemented
as keyword arguments, but I recommend to take a look at them. They
are useful
to tense the Spring, specify a damping value or give it a nicer color.
Finally the System has to be started and kept running with an infinite
loop.
Interaction with the system is possible with the mouse. A Mass is
picked by
clicking at it. It can be moved around and the rest of the system
responds to
the movement. To release the Mass the mouse must be clicked again.
Zooming / rotating of the scene is also done with the mouse by holding
the
left / right mouse button down.
For further details please have a look at the example programs and the
constructors of the classes System, Mass and Spring. Have fun!
--
|\/\/\/|
/------------------------------------------------------------------\ | |
| Markus GRITSCH | phone: +43 / 1 / 58801-36015 | | |
| Institute for Microelectronics | cellular: +43 / 676 / 4973431 | | (o)(o)
| Technical University of Vienna | fax: +43 / 1 / 58801-36099 | C _)
| Gusshausstrasse 27-29 / E360 | email: gr...@iu... | | ,___|
| A-1040 Vienna / AUSTRIA | SMS: 436...@ma... | | /
\------------------------------------------------------------------/ /____\
/ \
"Computers let you make more mistakes faster than any other invention in human
history, with the possible exception of handguns and tequila."
Mitch Radcliffe
|