Finding closest point on mesh
Posted 06 October 2006 - 06:41 AM
I'm searching a fast algorithm for the following problem:
I've an arbitrary 3d point P and a triangle mesh (consisting of vertices, edges and triangles). For point P I must find the coordinate of the closest point on the surface of the mesh. This point can therefore lay within a mesh's triangle, onto an edge or can coincide with a vertex.
The question is: How? How am I doing this efficiently?
My first thought was to try to find a point defined in barycentric coordinates on each triangle for which the distance to the point P is minimal. But I assume this is very time consuming and secondly I've no clue how to do that.
Another way of thinking was to find the closest vertex within the mesh. Then, find the closest point on each adjacent edge by projecting the point P on the edge and -- further on -- find the closest point on the adjacent triangles by projecting P onto the plane defined by them and checking if this projection lays within the triangle and taking the closest of all these. But this also sounds too inefficient.
Well, if anyone can give me a hint I'd be thankful.
Posted 06 October 2006 - 06:49 AM
Posted 06 October 2006 - 07:00 AM
Thanks for the fast reply. Yeah, I'll subdivide my mesh for acceleration. But do you think that there'll be a faster way to determine the closest point once a vertex/edge/triangle was selected? Faster than my second idea?
Posted 21 July 2011 - 04:07 PM
Posted 24 August 2011 - 08:40 AM
plese help me.
Posted 24 August 2011 - 09:09 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users