From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: find distance along complicated geometric surface
Date: Mon, 17 May 2010 21:48:03 +0000 (UTC)
Organization: Xoran Technologies
Lines: 28
Message-ID: <hssdij$7pp$>
References: <hss9t2$8ue$> <hssaqo$9k5$> <hssboe$avg$> <hssche$2o9$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1274132883 7993 (17 May 2010 21:48:03 GMT)
NNTP-Posting-Date: Mon, 17 May 2010 21:48:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: comp.soft-sys.matlab:636653

"Meagan " <> wrote in message <hssche$2o9$>...

> -the line is allowed to cross a face
> -the shape in convex
> -it is a 3D problem
> -it is correct to say that I am looking for the "path length" as in your example of a helix.

I'm going to hypothesize that the shortest distance across a 3D convex polyhedral surface is a piecewise linear path confined to a single plane (don't know how to prove it off the top of my head, though).

Under this hypothesis, a helpful tool for this problem might be the vert2con function in the FEX:

It will allow you to input the vertices and obtain the representation of the polyhedron in the form


The intersection of the polyhedron with a plane passing through your 2 given surface points is a 2D polygon. Using the above inequalities, you can find this 2D polygon and represent it in the x-y plane. Then, you can use this tool

to find the vertices of the 2D polygon and trace the distance between the successive vertices. 

The above will give you total distance between the two points for one particular planar cut through the 2 given surface points (and the polyhedron's surface). Using fminsearch, you can search over all such cuts for the minimum distance.

There are a lot of details to fill in here, but at least this might be a direction to go...