POV-Ray : Newsgroups : povray.general : Square Particles? : Re: Square Particles? Server Time
7 Aug 2024 01:19:15 EDT (-0400)
  Re: Square Particles?  
From: David Buck
Date: 8 Dec 2001 22:28:41
Message: <3C12DAC5.66B97A42@simberon.com>
"John D. Gwinner" wrote:

> I want to do something like a brick wall that collapses or gets blown apart.
>
> I could use some of the particle system's out there, but the bricks would
> have to 'rotate' a bit when they fall.  Bouncing wouldn't happen much, but
> they should twist as they fall.
>
> Any suggestions?
>
>                   == John ==

This is, unfortunately, one of the most difficult problems to solve in
physically based modeling.  Simple particle systems won't be able to handle this
correctly.  I can provide you with an idea of what it would take to do this and
refer you to some technical papers that would lead you through the theory, but
be warned that it's deep stuff mathematically.

In a nutshell, it's like this:  You need to start with rigid body mechanics.
The brick would be modeled as a body with a center of mass and an orientation.
In addition to applying forces and using the mass, calculating accelerations,
velocities and positions (as a simple particle system would), you also have to
apply torques and using the inertia tensor (a matrix), calculate angular
accelerations, angular velocities, and orientations.

You will probably have to beef up your differential equation solver from using
Euler to at least adaptive Runge-Kutta.  Most particle systems use Euler where a
portion of the acceleration is added to the velocity and a portion of the
velocity is added to the position.  This is find for simple things, but as the
problem gets more complex, it simply doesn't work and can cause your simulation
to gain energy and eventually "blow up".

Once you've solved that, you have to handle collision detection and reaction.
Collision detection for a rigid body is more complicated than for a particle
because a collision could occur anywhere along the surface of the rigid body.
Collisions could involve points (corners), edges, or entire surfaces.

The hardest problem is the continuous contact case.  You have to allow two rigid
bodies to slide along each other with friction (ideally) yet not
inter-penetrate.  I've read papers on this and I think I sort of "get it", but
implementing it correctly is a different matter.

If you want references, let me know and I'll be happy to dig them out for you.

David Buck
Simberon Inc.
www.simberon.com


Post a reply to this message

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