Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to calculate the intersection of two 3D parametric curves $\vec{C_1}$ and $\vec{C_2}$.

link to image

Those curves are parameterised by piecewise functions.

$\vec{C_1}= \begin{pmatrix}x_1(t)\\y_1(t)\\z_1(t)\end{pmatrix}\\ \vec{C_2}= \begin{pmatrix}x_2(t)\\y_2(t)\\z_2(t)\end{pmatrix}$

For example, $x_1(t)$ could look like this:

link to image

Ultimately, I need to calculate the intersection in C++ where I could use an arbitrary solver library, but first I need to get the math straight.

How can I transform this problem to a computer solvable formulation?

share|cite|improve this question
In general they won't intersect. Do you have any concrete examples that you are working with? – orangeskid Jan 24 '15 at 11:32

As long as your curves can be described either as by a function or even from data points, you can try to find the value of $t$ that the difference of the two curves to $0$, or approximately $0$ since you are implementing this.:

$$\hat C_1(t) - \hat C_2(t) = 0$$

One problem is that these may not necessarily intersect but that will only be known once it is attempted.

share|cite|improve this answer
No, careful, you could have $C_1(s) = C_2(t)$ as a common point, while $s \ne t$. – orangeskid Jan 24 '15 at 11:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.