Find the shortest distance between two object?

3 Ansichten (letzte 30 Tage)
Tianshu Yu
Tianshu Yu am 22 Jun. 2019
Kommentiert: darova am 22 Jun. 2019
My question:
(a) I have two object A and B. (They have some general curvy shape. They are objects in three dimension. They are composed of nodes with fixed coordinates). How can I found the distance on the vertical direction, or say the difference on the z-direction between the two object. I define the distance between two objects to be the shortest vertical distance between two noedes in the two objects. (Assumed that the two object don't intersect).
(b) Imagine now the object A can only move along the vertical direction, but the lateral position is fixed(x, y coordinate are fixed). This time I don't know if the two object intersect or not. I want to change the z position of object A so that the distance (as defined in (a)) between object A and B equals a setted number. Or at least slightly above it. Or you can think that I want A to be some distance above B and find the corresponding z.
Note: The object A can be generated from a mesh, While object B can be more generic. Object A and B can both just be two collections of nodes.
I would like to know if there's a good algorithm that can solve the two problems efficiently. Essentially it is just solving b. A is a definition. This problem have really bother me for a long time.

Antworten (0)

Kategorien

Mehr zu Elementary Polygons finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by