Finding Shortest Distance between two 3d Parametrized Curves

Click For Summary
SUMMARY

This discussion focuses on finding the shortest distance between two 3D parametrized curves defined by the equations Rm(t) and R(t). The user seeks to determine if these curves come within a distance of 0.5 units. The recommended approach involves creating a distance function with parameters t1 and t2, applying non-linear minimization algorithms, and ensuring that the minimization starts from various initial values to avoid local minima. Additionally, the user encounters challenges with Mathematica while attempting to solve for the roots of the derivative of the distance function.

PREREQUISITES
  • Understanding of 3D parametrized curves
  • Familiarity with non-linear minimization algorithms
  • Knowledge of calculus, particularly derivatives and optimization
  • Experience with Mathematica for mathematical computations
NEXT STEPS
  • Learn about creating distance functions for parametrized curves
  • Research non-linear minimization techniques, specifically the Davidon-Fletcher-Powell algorithm
  • Explore Mathematica commands for bounding solutions in FindRoots and NSolve
  • Study the geometric interpretation of shortest distances between curves in 3D space
USEFUL FOR

Mathematicians, engineers, and computer scientists working on optimization problems involving 3D curves, as well as users of Mathematica seeking to implement minimization algorithms effectively.

admbmb
Messages
3
Reaction score
0
So I have two parametrized equations for two different 3d curves:

Rm(t) = (1.2*sin(2πt) + 0:3)i + t4j + 1.1cos2(2π(t + 0:2))k

and

R(t) = Sin(2πt)i + t3j + Cos2(2πt)k

I need to figure out if these two curves come within a certain distance of each other (0.5).

I cannot understand how to find the shortest distance between these two curves if I'm not given the specific points where these two curves are closest.

Any help is very appreciated!
 
Physics news on Phys.org
admbmb said:
So I have two parametrized equations for two different 3d curves:

Rm(t) = (1.2*sin(2πt) + 0:3)i + t4j + 1.1cos2(2π(t + 0:2))k

and

R(t) = Sin(2πt)i + t3j + Cos2(2πt)k

I need to figure out if these two curves come within a certain distance of each other (0.5).

I cannot understand how to find the shortest distance between these two curves if I'm not given the specific points where these two curves are closest.

Any help is very appreciated!

You could calculate the distance between any two points on the two curves and use calculus to minimise this.
 
I don't know if there is a trick for your specific problem but here is a general approach:

You need to create a distance function with the two curve parameters, t1, t2, as the independent variables. Then you can apply standard non-linear minimization algorithms to that function. There are likely to be local minimums that are not global minimums, so you may have to minimize many times starting at different initial values of t1 and t2. Let's say that the values of the parameters t1 and t2 are in [0,1]. I think that if you start at each of the corner values (t1,t1) = (0,0), (0,1), (1,0), (1,1), and you get the same minimum solutions for (t1_min, t2_min), then the minimum at that point is global. If you get different minimum solutions at the corners, then I would repeat the minimization from several starting values of (t1_initial, t1_initial)
 
The "shortest distance" between two curves is always on a plane that is perpendicular to both curves. So the first thing I would do is determine the form a plane must have to be perpendicular to each curve.
 
HallsofIvy said:
The "shortest distance" between two curves is always on a plane that is perpendicular to both curves. So the first thing I would do is determine the form a plane must have to be perpendicular to each curve.
I'm having trouble visualizing that. Unless both curves are on a single plane, I don't see that a perpendicular plane exists.
 
FactChecker said:
I don't know if there is a trick for your specific problem but here is a general approach:

You need to create a distance function with the two curve parameters, t1, t2, as the independent variables. Then you can apply standard non-linear minimization algorithms to that function. There are likely to be local minimums that are not global minimums, so you may have to minimize many times starting at different initial values of t1 and t2. Let's say that the values of the parameters t1 and t2 are in [0,1]. I think that if you start at each of the corner values (t1,t1) = (0,0), (0,1), (1,0), (1,1), and you get the same minimum solutions for (t1_min, t2_min), then the minimum at that point is global. If you get different minimum solutions at the corners, then I would repeat the minimization from several starting values of (t1_initial, t1_initial)

Excellent, thank you! So I created a general function for distance, and then plotted that, and it looks correct. However, now I'm trying to solve for the roots of the derivative of that distance function to find where exactly the tangents are 0 (so I can find the minimum), but it's stuck calculating, and not returning results. The cell turns black (I'm using Mathematica) and stays that way. I'm trying to search to see if I can put bounds on the FindRoots, NSolve or Solve so that it doesn't evaluate forever, but no luck. Is there such a command? I only need to find the first value for which the derivative of distance is 0.
 
Do you have assess to a math package that includes minimization algorithms? Davidon-Fletcher-Powell is a minimization algorithm one should be able to solve directly for the minimum.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 7 ·
Replies
7
Views
1K
Replies
1
Views
2K