POV-Ray : Newsgroups : povray.newusers : Distance to a spline from a camera : Re: Distance to a spline from a camera Server Time
2 Nov 2024 03:14:37 EDT (-0400)
  Re: Distance to a spline from a camera  
From: Tim Nikias
Date: 12 Oct 2004 08:27:26
Message: <416bcdae@news.povray.org>
Well, just subtract the position from the camera's location, slap a
vlength(...) around it, and the resulting float is the distance in POV-Units
from position to location. An example:

#declare Camera_Location = <0,5,10>;
camera{location Camera_Location look_at <0,0,0>}

#declare Position = <4,6,12>;

#declare Distance = vlength(Camera_Location-Position);

Nice animation for a beginner, though the car is a little jerky at the
curves...

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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