|
|
TinCanMan wrote:
>
> "David Buck" <dav### [at] simberoncom> wrote in message
> > Yet another interesting case is when you have two barriers that form an X
> shape
> > and you drop the particle into the top of the X. It should come to rest
> just
> > above the center of the X. It's very hard to prevent the particle from
> falling
> > through.
> >
> > (If anyone has a good solution for that, I'd love to see it. The only
> good
> > solution I've seen involves solving sets of linear equations inside a
> triple
> > nested loop).
> >
> > David Buck
> > Simberon Inc.
> > dav### [at] simberoncom
> >
> >
> I have been working on a simple particle (ball actually) simulator that
> simulates balls bouncing, colliding, whatever within an area. I did have
> problems with balls 'sinking' through floors and solid objects because of
> gravity influence, but what I did to overcome that was add an extra property
> (3 actually, x,y,z) to each ball that indicated a dead ball in each axis
> direction. When a ball collides with a solid object, if it gains no
> momentum in one given axis, this flag is set to true (deadball) and
> gravitational acelleration has no influence on it in that direction (if
> another ball hits it, though, it gains the momentum back and the flag is
> reset).
Won't this work only if your walls and floors are parallel to the X, Y,
or Z axes?
David Buck
Simberon Inc.
www.simberon.com
Post a reply to this message
|
|