|
![](/i/fill.gif) |
"Tim Nikias v2.0" <no_lights (@) digitaltwilight.de> wrote in
news:3f642638@news.povray.org:
> They look quiet cute! Nice, bouncy balls!
LOL. I must have been inspired by the "superballs" I used to have at the
time.
> How dou you derive the spin for the balls? That's
> something that has interested me for years, but
> I've never found any useful link on my own, from
> I which I could understand how to do it. Is your
> approach only suitable for spheres, or could it be
> applied to boxes, cones etc? Any links?
It's an extremely simplified model, something I came up with way back
then, before the internet :-). So, as it is, it's only useful for
spheres where the center of mass is in the middle of the spheres:
When a collision is detected, I convert the ball's speed and rotation
vectors to vectors normalized to the collision surface normal, then I do
simple collision and friction loss calculations. If the collision is
with another sphere, the rotation speed "vectors" collisions are
calculated. After, the perpendicular vx,vz (to collision normal) speed
vectors are added to the related perpendicular rotation speed "vectors"
vrz,vrx respectively, divided by two (averaged, but could be adjusted
based on radius), minus a small friction loss penalty (released as heat
;-). The result is reassigned to both the perpendicular speed vectors
and the related perpendicular rotation "vectors". Finally reconverted to
world speed and rotation vectors, and applied to positions.
So the perpendicular speed at collision and related rotation vectors are
in bed together. This simplified model does not allow for slippage.
Post a reply to this message
|
![](/i/fill.gif) |