POV-Ray : Newsgroups : povray.programming : Particles (again...still) : Re: Particles (again...still) Server Time
28 Jul 2024 14:25:04 EDT (-0400)
  Re: Particles (again...still)  
From: Warp
Date: 15 Jun 2000 05:45:34
Message: <3948a5bd@news.povray.org>
Peter Popov <pet### [at] usanet> wrote:
: Just use vector math, it's so much easier.

  That's right.
  The idea is this: Create a vector which points at the direction you want
to go (it can be, for example, the desired end destination (supposing that
the movement is linear) minus the current location). Then convert it to
a unit vector (vnormalize) and multiply it by the distance you want to
travel along that path. Now just add that vector to the current location.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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