POV-Ray : Newsgroups : povray.unofficial.patches : MegaPOV mechsim environment collisions : MegaPOV mechsim environment collisions Server Time
1 Jul 2024 03:41:33 EDT (-0400)
  MegaPOV mechsim environment collisions  
From: Mack Tuesday
Date: 22 May 2003 22:55:04
Message: <web.3ecd8d002dbd02f25f597a2b0@news.povray.org>
Has anyone ever seen Sodaplay's SodaConstructor?  It's at
( http://sodaplay.com/constructor/index.htm )  It's a very simple
2-D mechanical simulator that makes little walking objects by
driving the springs in the mass-spring model with sinusoids.

I wanted to do the same thing in MegaPOV but I'm running into
problems.  The first thing I tried was to open the save_file,
read the values, update the "length" fields, and then explicitly
declare the masses and connections in the topology settings.  So
in this case I wasn't declaring the load_file.  This worked fine
except collisions with the environment failed completely -- my
masses fell through the ground as if it weren't there.

So then what I did was open the save_file, read the values,
update the "length" fields, and then *rewrite* another file from
scratch and use it as the load_file, rather than declare the
masses and connections explicitly as I had in the first case.
This works better but I'm still finding that my masses submerge
completely under the ground before the simulation seems to
understand that a collision has happened.

I increased the second friction value (the one that's 1.001 in
the tutorial examples) to 10.  That seemed to help a little.  I
also made sure the environment was really stiff.  This might
also have helped but the problem is basically still there.

Even in the tutorial examples the masses tend to fall past the
ground level too much.  I would understand if they were being
treated as point masses and the collisions were tested between
the environment and the center of the sphere, but even so I'm
pretty certain that the centers of the masses are falling past
the ground level anyway.

Any comments?  I would post my code but it would take some work
to pare it down, and I tested my code pretty thoroughly to make
sure where the problem actually lies.  I really don't think
posting my code would shed any light on the problem, but I'll
do that if someone insists that it's necessary.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.