Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <hss9t2$8ue$1@fred.mathworks.com> <hssaqo$9k5$1@canopus.cc.umanitoba.ca> <hssboe$avg$1@canopus.cc.umanitoba.ca> <hssche$2o9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1274132883 7993 172.30.248.37 (17 May 2010 21:48:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 17 May 2010 21:48:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1440443
Xref: news.mathworks.com comp.soft-sys.matlab:636653

"Meagan " <meagan.musselman@l-3com.com> wrote in message <hssche$2o9$1@fred.mathworks.com>...

> 
> -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:

http://www.mathworks.com/matlabcentral/fileexchange/7895-vert2con-vertices-to-constraints

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

A*x<=b

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

http://www.mathworks.com/matlabcentral/fileexchange/7894-con2vert-constraints-to-vertices

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...