roberson@ibd.nrccnrc.gc.ca (Walter Roberson) wrote in message
<fnr7q4$jan$1@canopus.cc.umanitoba.ca>...
> In article <8762bcc16e8940e79716
62c971b91910@s19g2000prg.googlegroups.com>,
> Steve <srjm72499@gmail.com> wrote:
> >I am looking to find the distance from a 3D point to a 2D polygon
> >defined by a list of vertices (3D points). Does anyone know an
> >efficient way to do this (or if there is code available)? I checked
> >matlab central, and didn't find anything  but I've missed stuff there
> >before.
>
> I don't know if there is a solution to your question already built;
> it sounds like the sort of thing that would have been done before,
> by someone.
Actually, if the polygon is convex, there is a
simple solution, using LDP (Least Distance
Programming.) I've seen a Matlab code for
LDP floating around the internet somewhere.
This does presume a convex polygon. If its
not convex, then all bets are off.
> >If I do have to code this myself, is it correct to assume that I will
> >project all points to common plane, then reduce this to a 2D point to
> >polygone problem, find the point on the polygon that is closest to the
> >projected point, then find the distance between these points in 3D?
Again, it depends on the convexity of your
polygon.
John
