POV-Ray : Newsgroups : povray.general : Some aid in physics required... : Re: Some aid in physics required... Server Time
3 Aug 2024 18:23:27 EDT (-0400)
  Re: Some aid in physics required...  
From: Christoph Hormann
Date: 24 Feb 2004 06:28:05
Message: <gvorg1-398.ln1@triton.imagico.de>
Tim Nikias v2.0 wrote:
>>And if it isn't visible, then what is the reason that you want to avoid
>>it?
> 
> 
> It's not visible, but I want to keep the System slick and fast.
> 
> Due to the adaptive technique, results like this occur: dozens of my
> particle just require one or two passes through a while-loop to interact
> with objects (when an intersection occurs, I redo the loop from that
> position onward, as to calculate energy-loss due to the bouncing, maybe
> irregularities in the reflection-direction etc). But a lying particle will
> do hundreds of passes through the loop as it will quickly bounce onto the
> surface (due to gravity) several times during the time that's passing per
> frame. That's when my System almost hangs up (the loop will terminate
> eventually, it's designed not to keep going on for ever cause some time
> amount will always be processed during one pass) and passes the loop like
> 3500 times for a single particle. Now, add some more trace-calls and a more
> complex algorithm inside the loop, and voila: Parsing times skyrocket!
> That's not slick and fast. :-) For two such >2500 particles in a bunch of
> 350, the parsing time went from 0.8 seconds to something around 2 or 3
> seconds. Now just imagine a setup where several particles will eventually
> come to rest at the end!

That is to be expected - you diminish the velocity during every 
collision but none the less the particles will still hop on the surface. 
  - the hops will get smaller over the time but this won't help of 
course.   This hopping is in fact the correct solution for your 
simulation problem. What you need is a more realistic model of the 
surface contact - you model the collision by inverting the particle 
velocity but you would need to model the damping during the longer time 
of actual surface contact.  This of course will not really solve your 
performance problem in the end because you will need small time steps 
during the collision but it will improve the quality of the simulation - 
in the end your particles will smoothly 'flow' on the surface.

Christoph

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


Post a reply to this message

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