MINIMUM DISTANCE BETWEEN TWO CURVES [message #20442] |
Thu, 22 June 2000 00:00  |
Mark C.
Messages: 11 Registered: December 1998
|
Junior Member |
|
|
Given:
a=f(x,y,z) and b=g(x,y,z), both a and b are separate curves. (Not straight
lines. Nor do they loop over themselves). f and g are unknown functions.
Only know g and f by some points in 3D space. Points are irregularly spaced.
Objective:
Find the minimum distance between a and b. Give the coordinate where this
minimum occurs in term of the nearest point on a and the nearest point on b.
Needs help:
Does anyone have a routine to do such calculation using IDL? Any other
suggestions appreciated.
Thanks in advance,
Mark Chan
|
|
|
Re: MINIMUM DISTANCE BETWEEN TWO CURVES [message #20569 is a reply to message #20442] |
Tue, 04 July 2000 00:00  |
David Fenyes
Messages: 10 Registered: November 1996
|
Junior Member |
|
|
> a=f(x,y,z) and b=g(x,y,z), both a and b are separate curves. . . .
> Find the minimum distance between a and b. Give the coordinate where
this
You are minimizing F(i)-G(j) = f(x(i),y(i),z(i))-g(x(j),y(j),z(j)), a
func. of 2 params. There is no general method for accomplishing this
for f and g unknown. It's been a while since I used IDL, but it uses
Numerical Recipes, which has some minimization routines, including
simplex (will gravitate to a local minimum) and simulated annealing
(better chance of global minimum). I seem to recall some of these are
in IDL.
I've seen some genetic programming algorithms on
the web as well. Any good algorithm or operations research book
should get you started.
David
--
David Fenyes -- _dave_@_swbell_._net_ - remove the '_'s for address
|
|
|