Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!caen!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!bloom-beacon!eru!sow From: sow@cad.luth.se (Sven-Ove Westberg) Newsgroups: comp.graphics Subject: Re: Distance from a point to a polygon in 3-space Message-ID: <1785@eru.mt.luth.se> Date: 12 Apr 91 19:01:48 GMT References: <1991Apr12.000218.3215@jarvis.csri.toronto.edu> Organization: University of Lulea, Sweden Lines: 13 In article <1991Apr12.000218.3215@jarvis.csri.toronto.edu> corkum@csri.toronto.edu (Brent Thomas Corkum) writes: |I'm looking for a reference, algorithm or C code snipit that calculates |the EXACT distance from a 3D point to 3D CONVEX polygon (always a triangle or |quadralateral). In the end though, I need to calculate the distance from You can not calulate the EXACT distance to a quadralateral if it is not planar. On non planar quadralateral the distance depends on how you define the surface. One common way do do it is to divide each quadralateral in two triangels. You can divide the quadralateral in two ways and get different results. Sven-Ove Westberg, CAD, University of Lulea, S-951 87 Lulea, Sweden. Internet: sow@cad.luth.se