

Mike Horvath <mik### [at] gmailcom> wrote:
> No, the first point is somewhere in space and is not connected to the
> camera.
>
>
>
> > Mike Horvath <mik### [at] gmailcom> wrote:
> >> How do I calculate the distance between a point and the camera? Except,
> >> I am using an orthographic camera, so I really need the distance between
> >> a point and the plane formed by the camera's up and right vectors.
> >
> > Or you could use a Graphics Gems macro to actually calculate the shortest
> > (perpendicular) distance between the (transformed) camera point and the
> > (transformed) upright plane.
> >
> >
>
> The plane doesn't actually have to be the upright plane exactly, but it
> does need to be parallel to it
OK  that's just the plane equation, IIRC: Ax+By+CzD = 0
Also in F. Lohmueller's analytical geometry include file (Insert Menu?)
and you just set the "offset" from the origin with D.
same as you'd do with plane {z, D}
Then you calculate the distance of the point from that plane.
http://news.povray.org/povray.binaries.images/message/%3Cweb.5880fc4d1652a4dcc437ac910%40news.povray.org%3E/#%3Cweb.588
0fc4d1652a4dcc437ac910%40news.povray.org%3E
> and lie somewhere beyond the extents of
> the model.
That's confusing, since usually the image projection plane is "in front of" all
the stuff  between the camera and the "model", not "beyond the extents" of it.
But I think the link gives you exactly what you need.
Post a reply to this message

