|
![](/i/fill.gif) |
In article <3de4eb79$1@news.povray.org>,
"Sir Charles W. Shults III" <aic### [at] cfl rr com> wrote:
> If you know where your camera is in POVray (in coordinates or units) and
> you also know where your object is, the distance is sqrt( (x2 - x1)^2
> + (y2 - y1)^2 + (z2 - z1)^2 ), the old and venerable Pythagorean
> theorem.
> <x1, y1, z1> should be your camera location, and <x2, y2, z2> should be
> your object location.
vlength(Pt - CamPos) is a bit easier and faster parsing. You only really
need the Pythagorean equation when you are writing functions. Similar to
using vrotate() instead of sin() and cos(), or vtransform() or transform
functions instead of doing the transformations manually.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |