comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » MINIMUM DISTANCE BETWEEN TWO CURVES
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
MINIMUM DISTANCE BETWEEN TWO CURVES [message #20442] Thu, 22 June 2000 00:00 Go to next message
Mark C. is currently offline  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 Go to previous message
David Fenyes is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: announcement of a IDL library at Forschungszentrum Jülich
Next Topic: Automatic Brain Detection from MRI scans

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:15 PDT 2025

Total time taken to generate the page: 0.00543 seconds