kinematic toy

Kragen kragen-discuss@gentle.dyn.ml.org
Mon, 16 Nov 1998 23:32:26 -0500 (EST)


I'd like to build a little kinematics toy.  You'd click on the screen to
create joints and rigid members between them; you could drag joints (or
members) to try to make them move; and you could specify certain nodes
as 'fixed points'.  In moving, all the joint linkages would be taken
into account; if there was no way to reach a consistent state, you
wouldn't be able to drag the node you started with any further.

The obvious way to do this would be to do a depth-first traversal of the
linegraph for each motion, starting from the point of the motion, and
for each node, trying to compute some representation of its new possible
set of positions.  Fixed nodes would not move.  If no solution to the
constraints could be found, none of the nodes would move.

If you tried to move a node beyond its constraints, you would end up
with no motion.  For certain nodes --- e.g. those connected by a member
to a fixed point --- it could be rather difficult to move the node
within its constraints with a mouse.

Another possibility would simulate continuous motion of the nodes with
elasticity forces in the members between them.  You could simply exert a
force on your end node, which would exert forces on the ones connected
to it, etc.  Eventually all the forces would be known, and the motion of
the nodes could be calculated.

This seems crude and expensive, and it seems that nonzero timesteps
could result in `tunneling' behavior.

Kragen

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
I don't do .INI, .BAT, .DLL or .SYS files. I don't assign apps to files. I
don't configure peripherals or networks before using them. I have a computer
to do all that. I have a Macintosh, not a hobby. -- Fritz Anderson