POV-Ray : Newsgroups : povray.general : Bouncing stick. : Re: Bouncing stick. Server Time
30 Jul 2024 20:23:00 EDT (-0400)
  Re: Bouncing stick.  
From: scott
Date: 28 May 2008 04:27:12
Message: <483d1760$1@news.povray.org>
> Can anyone give me a pointer on how to calculate/work out how a stick
> would fall then bounce when it hits a sloping floor?
> I could do a simple sphere but my brains are wracked with a cylinder
> :)

Three different methods I can think of (easiest and least realistic first):

1) Assume the stick is two point masses in 3D connected by a (stiff) spring. 
Then, you can just deal with the two point masses by themselves, but add in 
an extra force for the spring connecting them.  If you make the spring stiff 
enough it will look ok, you might need to use quite small time-steps though 
to stop the spring exploding.

2) A kind of half-way stage would be to simulate the stick falling in 2D, 
and assume it's just a line, that might make the maths a bit easier, 
although you'll still need to mess about with moments of inertia and angular 
velocities, just not in full 3D.

3) The more complex and correct way is as Aydan said, you need to also keep 
track of the angular momentum and orientation of the stick (in addition to 
the linear momentum and position) all in 3D.  When either end comes into 
contact with the ground you then need to apply a force and a torque to the 
stick that will keep it above the ground.  You'll need a good knowledge of 
3D kinetics to make this one work - like how torques in 3D affect the 
angular velocity, and how that affects the orientation etc, it's not as 
simple as the linear cases, using quaternions makes things easier.


Post a reply to this message

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