POV-Ray : Newsgroups : povray.advanced-users : Air resistance : Re: Air resistance Server Time
29 Jul 2024 20:27:12 EDT (-0400)
  Re: Air resistance  
From: Greg M  Johnson
Date: 16 Feb 2001 09:46:35
Message: <3A8D3BD9.DADAC8CF@my-dejanews.com>
"Greg M. Johnson" wrote:

> In my systems,
>     #declare velocity=velocity-0.1*y;
> is how I usually do gravity.

IMHO I think my advice is the best here for frame-by-frame pov coding of gravity.

> #declare velocity=velocity-dragconstant*velocity^2;
> where dragconstant=0.005;   //for starters

Oops!  an error above.

//   for a frame-by-frame system, experiment with small numbers for drag; toss
textbook values in dustbin.
#declare dragconstant=0.005;

//   Wind is some varying vector.
#declare wind=foo;

//   Wind blowing at craft means double effect; blowing with craft negates
effect.
#declare netdirection=wind-velocity;

//   I forgot that velocity was a vector in last version I shared.
#declare
velocity=velocity+vnormalize(netdirection)*dragconstant*vlength(netdirection)^2;


Post a reply to this message

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