POV-Ray : Newsgroups : povray.binaries.animations : MegaPOV MechSim: Grouping & Gravity Server Time
19 Jul 2024 09:29:26 EDT (-0400)
  MegaPOV MechSim: Grouping & Gravity (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Tom Bates
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2-1.mpg - 490 KB)
Date: 27 Jul 2003 23:43:34
Message: <3f249be6@news.povray.org>
In the second, Test2-1.mpg, the objects are separated into
groups, and they are still not connected.  This works as
expected.

Thank you,

Tom Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message


Attachments:
Download 'Test2-1.mpg' (491 KB)

From: Tom Bates
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2-2.mpg - 490 KB)
Date: 27 Jul 2003 23:44:25
Message: <3f249c19@news.povray.org>
In the third, Test2-2.mpg, no grouping was done, and the
objects are connected.  This works as expected.

Thank you,

Tom Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message


Attachments:
Download 'Test2-2.mpg' (491 KB)

From: Tom Bates
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2-3.mpg - 490 KB)
Date: 27 Jul 2003 23:45:41
Message: <3f249c65@news.povray.org>
In the fourth, Test2-3.mpg, the objects are separated into
groups, and the objects are connected.  This does not work
as expected.  For some reason, it seems that this
arrangement affects the objects response to gravity.

Thank you,

Tom Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message


Attachments:
Download 'Test2-3.mpg' (491 KB)

From: Tom Bates
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2.pov - 6 KB)
Date: 27 Jul 2003 23:56:51
Message: <3f249f03@news.povray.org>
I am attaching the source that produced the test renders.

The same file produced all four renders.

I simply changed the TestNum variable in the following lines:

#local  TestNum   = 3;
#local  DOGROUP   = div(mod(TestNum,2),1);  //  <<--  the first bit
#local  DOCONNECT = div(mod(TestNum,4),2);  //  <<--  the second bit

This test file is a stripped copy of my full project file.

Thank you,

Tom Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message


Attachments:
Download 'Test2.pov.txt' (7 KB)

From: Rick [Kitty5]
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2-3.mpg - 490 KB)
Date: 28 Jul 2003 13:52:53
Message: <3f2562f5@news.povray.org>
Tom Bates wrote:
> In the fourth, Test2-3.mpg, the objects are separated into
> groups, and the objects are connected.  This does not work
> as expected.  For some reason, it seems that this
> arrangement affects the objects response to gravity.

does it only effect this arrangement?

(nice series btw, appreciate you posting all of them)

-- 
Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : +44 (01270) 501101 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

From: Tom Bates
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2-3.mpg - 490 KB)
Date: 28 Jul 2003 14:03:09
Message: <3f25655d$1@news.povray.org>
Rick [Kitty5] wrote:
> Tom Bates wrote:
> > In the fourth, Test2-3.mpg, the objects are separated into
> > groups, and the objects are connected.  This does not work
> > as expected.  For some reason, it seems that this
> > arrangement affects the objects response to gravity.
>
> does it only effect this arrangement?

Yes.  It seems that the gravity disappears (or is greatly
diminished) only when the objects are grouped and then
connections made between them.

I haven't tried using the other simulation method of detecting
collisions between all elements and not using groups.
I'll try that next to see if that will work.

I'm still curious why this is happening though.

>
> (nice series btw, appreciate you posting all of them)

Thank you.  I spent a lot of time isolating the conditions of
this problem.  I was hoping to make those conditions clear
in my post.

>
> --
> Rick

Tom Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message

From: Tom Bates
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2-3.mpg - 490 KB)
Date: 28 Jul 2003 16:33:50
Message: <3f2588ae@news.povray.org>
Yes, I'm replying to myself.

Tom Bates wrote:
> Rick [Kitty5] wrote:
> > Tom Bates wrote:
> > > In the fourth, Test2-3.mpg, the objects are separated into
> > > groups, and the objects are connected.  This does not work
> > > as expected.  For some reason, it seems that this
> > > arrangement affects the objects response to gravity.
> >
> > does it only effect this arrangement?
>
> Yes.  It seems that the gravity disappears (or is greatly
> diminished) only when the objects are grouped and then
> connections made between them.
>
> I haven't tried using the other simulation method of detecting
> collisions between all elements and not using groups.
> I'll try that next to see if that will work.

Ok, I removed the grouping, and tried collision method 1
(MECHSIM_COLLISION_ALL) "Collisions between all
simulation elements are calculated."  The results are
exactly the same as grouping the objects and using
collision method 2 (MECHSIM_COLLISION_GROUP)
"Only collisions between elements of different groups
are calculated."

So, that means that this problem is not a problem with
grouping, but a problem with collision detection and the
way I have my objects connected.

This is too bad, because I really need to connect my
objects that way.


Tom Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message

From: Mike Williams
Subject: MegaPOV MechSim: Grouping & Gravity (Test2-3.mpg - 490 KB)
Date: 28 Jul 2003 16:58:23
Message: <HuwtVOAb4YJ$EwPD@econym.demon.co.uk>
Wasn't it Tom Bates who wrote:
>In the fourth, Test2-3.mpg, the objects are separated into
>groups, and the objects are connected.  This does not work
>as expected.  For some reason, it seems that this
>arrangement affects the objects response to gravity.

Here are some thoughts about what might be going on.

I've had experience whereby if two connected masses become closer than the sum
of their radii, then they can get stuck in mid air.

When you're using the connections, then these lines try to cause two masses of
radius 0.1 to be 0.1 units apart, and might have something to do with it.

connection { mEnd - 2, mStart+ 2 stiffness Stiff  damping Damp length 0.1}
connection { mEnd - 1, mStart+ 3 stiffness Stiff  damping Damp length 0.1}

I can't seem to fix it by increasing the connection length in your example,
but I can remove the "getting stuck in mid air" effect by reducing the radii
of the masses (including those in the grid) to 0.01 and raising the density to
1000000 to keep their mass the same. Unfortunately, it then seems to miss some
of the collisions, and the bones interpenetrate - I can't help you with that
effect. 

Here's a simple topology that exhibits getting stuck in mid air only if groups
and connections are switched on:

      topology {

         #if (DOGROUP) group { #end
            mass { <0,2,0>, 0, 0.1 density Dense }          
            mass { <1,2,0>, 0, 0.1 density Dense }          
            connection { 0, 1 stiffness Stiff damping Damp }
         #if (DOGROUP) } #end

         #if (DOGROUP) group { #end
            mass { <0,1,1>, 0, 0.1 density Dense }          
            mass { <1,1,1>, 0, 0.1 density Dense }          
            connection { 2, 3 stiffness Stiff damping Damp }
         #if (DOGROUP) } #end

         #if (DOCONNECT)
            connection { 1, 2 stiffness Stiff damping Damp length 0.15}
         #end

        save_file "test2.dat" 3
      }

* All constants as per Tom's original file.
* Because there are no faces, use this to display the object
        MechSim_Show_All_Objects(-1, false, -1, "")

If you vary the length, then at about length 0.184 you'll find that the object
hits the ground before the connection manages to get the masses close enough
to get stuck.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Christoph Hormann
Subject: Re: MegaPOV MechSim: Grouping & Gravity
Date: 29 Jul 2003 05:49:30
Message: <3F264329.9B80AD5F@gmx.de>
Tom Bates wrote:
> 
> [...]
> 
> In the fourth, Test2-3.mpg, the objects are separated into
> groups, and the objects are connected.  This does not work
> as expected.  For some reason, it seems that this
> arrangement affects the objects response to gravity.

I don't have the time at the moment to test your code but it is unlikely
that there is anything wrong with gravity.  Gravitational forces are
handled completely separately from collisions and connections.  As always
it would help finding the problem if you reduce it to a simpler case. 
Also try deactivating certain features like friction, mass-face-collisions
etc. and using smaller time steps.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 17 Jun. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: None
Subject: Re: MegaPOV MechSim: Grouping & Gravity (Test2.pov - 6 KB)
Date: 29 Jul 2003 10:52:04
Message: <Xns93C76E9062ABENone@204.213.191.226>
"Tom Bates" <tho### [at] shawca> wrote in
news:3f249f03@news.povray.org: 

> I am attaching the source that produced the test renders.
> [...]

Very interesting tests, thanks for the source.


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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