POV-Ray : Newsgroups : povray.general : animating complex scenes : Re: animating complex scenes Server Time
2 Aug 2024 22:16:31 EDT (-0400)
  Re: animating complex scenes  
From: Chris Johnson
Date: 25 Jun 2004 09:05:27
Message: <40dc2317$1@news.povray.org>
It depends really on how complex the animation is, or rather, how long a
computer takes to calculate the required coordinates for the animation. SDL
has the advantage that its automatically evaluated for you at parse time, so
theres no need to worry about fiddling around with external programs, but on
the other hand, its slow. For any difficult calculation, i.e. one which
takes the computer some time to calculate, an external program is often the
only way to get things done in a reasonable time. However, I tend to use C++
programs for things which I could probably do in SDK, just because I'm more
familiar with C++ than SDL.

Moving to your specific case, simulating grains of sand in an hour glass
accurately is very difficult indeed. To do it properly, one would have to
use a rigid body dynamics simulator to model every grain, but for a large
number of grains, simulators like this are likely to become very slow and
possibly unstable.

The way I'd probably go about doing sand is to look at an hourglass and
observe the various things that are happening:

A conical pile of sand grows at the bottom
The cone of sand at the top shrinks, gaining a dent on its surface above the
hole
Sand falls vertically (more or less) from the hole until it hits the cone of
sand at the bottom

and simulate these individually without accurate consideration of the actual
physics of the problem. Obviously there are things that still need to be
considered to make it seem physically real (the volume of the bottom pile of
sand increases at the same rate as the decrease in volume of the top pile,
for example), but the simulation is based primarily on what looks good,
rather than what is physically correct.

You might be able to use isosurfaces for the two piles of sand and a simple
particle system for the falling grains - in this case, the SDL is probably
suitable, since there isn't that much calculation to be done.

-Chris


Post a reply to this message

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