POV-Ray : Newsgroups : povray.advanced-users : Flying and bouncing debris : Re: Flying and bouncing debris Server Time
29 Jul 2024 08:11:35 EDT (-0400)
  Re: Flying and bouncing debris  
From: Tim Nikias
Date: 19 Sep 2002 05:17:26
Message: <3d899626@news.povray.org>
Hm. Somehow I can't get the code to work, though I implemented
just that in my particle system. I've got a headache (due to a
flu), so I'm not really up to it now. Still, the equations you need
are the same:

Position = Initial_Position+ Direct_Speed*Time - y*.5*Gravity*Time*Time;
Speed = Direct_Speed -y*Gravity*Time;

All you need to do is modify the equations in order to find the
exact time when the particle hits the ground again, then calculate
the speed and position of impact, multiply the new direction with
<1,-1,1> (to bounce from the y-plane) and a float < 1 for
dampening, and go on until you reach the present time. Shouldn't
be too difficult.

Regards,
Tim


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
"Tim Nikias" <tim### [at] gmxde> schrieb im Newsbeitrag
news:3d89870b$1@news.povray.org...
> Oops, that should be
>
> Actual_Direction_Speed = Direction_Speed - Time*Gravity*y;
>
> not plus (+) Gravity.
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
>
>


Post a reply to this message

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