POV-Ray : Newsgroups : povray.binaries.images : The POV-cannon : Re: The POV-cannon Server Time
7 Aug 2024 23:24:10 EDT (-0400)
  Re: The POV-cannon  
From: Mike Williams
Date: 16 Jan 2006 07:24:27
Message: <9Puc8CAP84yDFwgx@econym.demon.co.uk>
Wasn't it Bill Pragnell who wrote:
>"Afishionado" <afi### [at] gmailcom> wrote:
>> What about defining shapes (cubic_sweeps, maybe?) going from each brick to
>> it's "starting" location, filled with media. Each brick would leave a trail
>> of dust in the air. :-)
>Interesting idea, but each brick's displacement is a straight line, so it
>would look a bit strange. If this were based on a physics simulation it
>would look great!

You don't need much of a physics simulation. If you use your existing
calculated displacement as representing an initial velocity, and ignore
collisions and drag, the mathematics of the parabolic trajectories are
pretty simple.

The horizontal components of the velocity of a brick would be considered
constant, so the X and Y distances are just Vx*frame_number and
Yy*frame_number. The brick accelerates vertically at a constant rate, so
we can use S=ut+0.5*at^2 to give 
        Vz*frame_number-0.5*G*pow(frame_number,2)
with G being adjusted for the scale and frame rate.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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