POV-Ray : Newsgroups : povray.binaries.animations : balls simulation (665k) Server Time
23 Apr 2024 04:47:51 EDT (-0400)
  balls simulation (665k) (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Christoph Hormann
Subject: balls simulation (665k)
Date: 12 May 2002 18:10:08
Message: <3CDEE7FD.B2EA955@gmx.de>
I started working on a physically accurate mechanics simulation system,
here is one of the first results.

One feature of this simulation is that it does not use any impact
calculations but simulates collisions with elasticities.  As visible from
the animation i choose quite high elasticity, this makes numerics much
easier, but with small enough integration steps this can be changed. 
Using this method you can completely avoid testing a lot for possible
collisions, even in complex environments.  I just converted the scene
geometry to an iso_rcsg function and this way can check any time how near
the different balls are to the surface.

I also tried modeling the water interaction using the same method as
recently shown by Rune.  In contrast to the other things this is not
physically accurate of course.  What's really difficult about this water
trick is synchronization with the rest of the system, you have the
discrete simulation steps and cannot change the speed continuously.  Apart
from that it's also quite a problem to find the right disturbance from the
balls reaching the surface that creates an appropriate wave.  A lot of
factors have to be taken into account.  Right now the disturbance only
depends on the sign of the ball's speed and not the speed itself meaning
fast balls have the same effect as slow ones, just the direction makes a
difference.

Some more facts about the animation, it's slow-motion 1:2 in fact, the
balls have a density of 5 g/cm^3 and a radius of 0.15-0.45 m.  Stiffness
of the environment is 100000 N/m.  Buoyancy and damping during collisions
is simulated, damping in water is not yet accurate.  

For integration i used simple Euler method, i also implemented 2nd order
(Heun) algorithm, but without calculating the influence of the other balls
twice, this takes most of the time naturally and environment collisions
occur much more often.  For this animation i used 17 steps each 1/1000
second for each frame, but i presume if i use twice as many steps the
final ball arrangement will look quite a bit different... ;-)

But now enough words, here is the animation, a longer and better version
can be found on:

http://www.tu-bs.de/~y0013390/files/ball_sim1.mpg

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message


Attachments:
Download 'ball_sim1a.mpg' (665 KB)

From: James Taylor
Subject: Re: balls simulation (665k)
Date: 12 May 2002 19:15:58
Message: <3cdef7ae@news.povray.org>
Thats very, very nice...good work.

jim


Post a reply to this message

From: Dearmad
Subject: Re: balls simulation (665k)
Date: 12 May 2002 20:26:56
Message: <3CDF097E.B5FD60C@applesnake.net>
the water is incredible and shows a lot of potential.  whoa.  that is
very impressive.

very- organic.

-p


Post a reply to this message

From: Tim Nikias
Subject: Re: balls simulation (665k)
Date: 13 May 2002 00:33:30
Message: <3CDF41F6.1E831080@gmx.de>
Looks pretty neat, though the waves of the water look
kinda strange, with strange peaks when being hit
by a ball.

But that's probably due to the algorithm.

So, you're using no collision detection, but
elasticities... Are you using lots of springs and
forces for that?

Christoph Hormann wrote:

> I started working on a physically accurate mechanics simulation system,
> here is one of the first results.
>
> One feature of this simulation is that it does not use any impact
> calculations but simulates collisions with elasticities.  As visible from
> the animation i choose quite high elasticity, this makes numerics much
> easier, but with small enough integration steps this can be changed.
> Using this method you can completely avoid testing a lot for possible
> collisions, even in complex environments.  I just converted the scene
> geometry to an iso_rcsg function and this way can check any time how near
> the different balls are to the surface.
>
> I also tried modeling the water interaction using the same method as
> recently shown by Rune.  In contrast to the other things this is not
> physically accurate of course.  What's really difficult about this water
> trick is synchronization with the rest of the system, you have the
> discrete simulation steps and cannot change the speed continuously.  Apart
> from that it's also quite a problem to find the right disturbance from the
> balls reaching the surface that creates an appropriate wave.  A lot of
> factors have to be taken into account.  Right now the disturbance only
> depends on the sign of the ball's speed and not the speed itself meaning
> fast balls have the same effect as slow ones, just the direction makes a
> difference.
>
> Some more facts about the animation, it's slow-motion 1:2 in fact, the
> balls have a density of 5 g/cm^3 and a radius of 0.15-0.45 m.  Stiffness
> of the environment is 100000 N/m.  Buoyancy and damping during collisions
> is simulated, damping in water is not yet accurate.
>
> For integration i used simple Euler method, i also implemented 2nd order
> (Heun) algorithm, but without calculating the influence of the other balls
> twice, this takes most of the time naturally and environment collisions
> occur much more often.  For this animation i used 17 steps each 1/1000
> second for each frame, but i presume if i use twice as many steps the
> final ball arrangement will look quite a bit different... ;-)
>
> But now enough words, here is the animation, a longer and better version
> can be found on:
>
> http://www.tu-bs.de/~y0013390/files/ball_sim1.mpg
>
> Christoph
>
> --
> POV-Ray tutorials, IsoWood include,
> TransSkin and more: http://www.tu-bs.de/~y0013390/
> Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______
>
>   ------------------------------------------------------------------------
>                      Name: ball_sim1a.mpg
>    ball_sim1a.mpg    Type: MPEG media file (video/mpeg)
>                  Encoding: base64

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Christoph Hormann
Subject: Re: balls simulation (665k)
Date: 13 May 2002 01:42:11
Message: <3CDF5233.2788304C@gmx.de>
James Taylor wrote:
> 
> Thats very, very nice...good work.
> 

Thanks!

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: balls simulation (665k)
Date: 13 May 2002 01:43:14
Message: <3CDF5273.EEE20A0B@gmx.de>
Dearmad wrote:
> 
> the water is incredible and shows a lot of potential.  whoa.  that is
> very impressive.
> 
> very- organic.
> 

Thanks you.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Christoph Hormann
Subject: Re: balls simulation (665k)
Date: 13 May 2002 01:48:41
Message: <3CDF53B7.28680977@gmx.de>
Tim Nikias wrote:
> 
> Looks pretty neat, though the waves of the water look
> kinda strange, with strange peaks when being hit
> by a ball.
> 
> But that's probably due to the algorithm.


Yes, these are part of the algorithm although they are not unrealistic per
se, There is usually some kind of splashing after a body enters the water
because the water surfaces collide, but it's commonly not that smooth of
course.

> So, you're using no collision detection, but
> elasticities... Are you using lots of springs and
> forces for that?

You can't see this as individual springs, you simply have the potential
field of the environment and the other bodies and calculate the forces
from it.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Hugo
Subject: Re: balls simulation (665k)
Date: 13 May 2002 08:10:54
Message: <3cdfad4e$1@news.povray.org>
> I just converted the scene geometry to an iso_rcsg function
> and this way can check any time how near the different balls
> are to the surface.

Interesting project you're having! Forgive my ignorance but how do you get
an output of the isosurface evaluation, for a point within the bounding
object? With the geometry in your example, is it really faster than using
primitives and individual col. testing?

Regards,
Hugo


Post a reply to this message

From: Rune
Subject: Re: balls simulation (665k)
Date: 13 May 2002 09:55:18
Message: <3cdfc5c6@news.povray.org>
Very nice simulation!

However, even though the slow-motion playback often better show off the
details, I usually prefer real-time playback because it gives a much
better feel of how realistic the simulation is.

I see that you have also found the many problems with the water surface
algorithm that we're using... ;)

Anyway, keep up the good work!

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:  http://rsj.mobilixnet.dk (updated Apr 14)
POV-Ray Users: http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Ring:  http://webring.povray.co.uk


Post a reply to this message

From: Christoph Hormann
Subject: Re: balls simulation (665k)
Date: 13 May 2002 11:34:16
Message: <3CDFDCF8.7D4B859A@gmx.de>
Hugo wrote:
> 
> > I just converted the scene geometry to an iso_rcsg function
> > and this way can check any time how near the different balls
> > are to the surface.
> 
> Interesting project you're having! Forgive my ignorance but how do you get
> an output of the isosurface evaluation, for a point within the bounding
> object? 

I don't understand, you can evaluate an isosurface function wherever you
like.

> With the geometry in your example, is it really faster than using
> primitives and individual col. testing?

That's a difficult question.  

Some arguments for the elasticity model are:
- easier to program and to extend to arbitrary geometries.  
- with collision testing you can't modell soft collisions at all.
- it is surely faster for environment collisions than calculating the
distance to all planes forming the geometry by hand which would be
necessary to truly test for collisions (just tracing in direction of
movement is obviously not enough) 
- edges are a serious problem with collision modelling.  The movement of a
ball hitting the edge of an object is not defined since you can't
calculate the normal at the edge.  

On the other hand you can use fairly large integration steps when using
collision calculation since the collision itself is not part of the
differential equation you are trying to solve.  With elasticity you have
to use fairly small steps to get realistic results.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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