POV-Ray : Newsgroups : povray.general : Square Particles? Server Time
20 Nov 2024 02:14:28 EST (-0500)
  Square Particles? (Message 1 to 5 of 5)  
From: John D  Gwinner
Subject: Square Particles?
Date: 7 Dec 2001 13:22:28
Message: <3c1108e4$1@news.povray.org>
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 ==


Post a reply to this message

From: John VanSickle
Subject: Re: Square Particles?
Date: 8 Dec 2001 03:36:00
Message: <3C11D1BB.4F1EB798@hotmail.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?

Assign a particle to each end of each brick (two per brick).  Take the
difference in starting location, and their difference in starting
velocity.

Take the cross-product of these two vectors.  Use the direction of the
cross product as the axis of rotation, and the magnitude of the vector
for the rate of rotation for the bricks.  Rotate them around the
axis (using the clock, times the magnitude, times a constant scaling
factor, as the rotation angle), and then translate them to their
location.

Hope this helps,
John
-- 
ICQ: 46085459


Post a reply to this message

From: David Buck
Subject: Re: Square Particles?
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

From: Christoph Hormann
Subject: Re: Square Particles?
Date: 9 Dec 2001 04:34:22
Message: <3C13301D.EC644828@gmx.de>
David Buck wrote:
> 
> [...]
> 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.

I think you usually approximate the friction characteristic (with has a
jump when the relative speed is zero) with a differentiable function.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: John D  Gwinner
Subject: Re: Square Particles?
Date: 9 Dec 2001 14:34:37
Message: <3c13bccd$1@news.povray.org>
Ouch, I was hoping someone had done this already with POVRay :-)

I've got a lot of the varios papers downloaded over the years, i.e. RAPID,
V-COLLIDE and others.  I hadn't really wanted to put together a generalized
collision program, but it might be the only way to do it.

Easier, maybe I'll just completly blow the thing up instead of blowing a
hole in it :-)

                  == John ==

"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:3C13301D.EC644828@gmx.de...
>
>
> David Buck wrote:
> >
> > [...]
> > 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.
>
> I think you usually approximate the friction characteristic (with has a
> jump when the relative speed is zero) with a differentiable function.
>
> Christoph
>
> --
> Christoph Hormann <chr### [at] gmxde>
> IsoWood include, radiosity tutorial, TransSkin and other
> things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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