# Solving for intersection of line and a vector function.

How would one approach a problem of finding intersection points between a line $\vec l = \vec S + d \vec t$ and vector of the form $$\vec v = \begin{pmatrix} x \\ y \\f(x, y) \end{pmatrix}$$

I am mainly looking for fast numerical methods. If anyone would take the time to explain through example of $f(x, y) = sin(x) + sin(y)$

If there is a more general form to solve intersections between the line and vectors of form $\vec v'= \begin{pmatrix} f_1(t) \\ f_2(t) \\f_3(t) \end{pmatrix}$ then I would love to know that as well. To be exact I am looking for the first intersection (intersection with the lowest distance d in direction $\vec t$) Hope the question is not too vague. If it is please tell me about the constraints needed. Any reference or keyword helps. Thank you.

EDIT:

I am thinking that we can write $\vec l$ as a combination of its parts and then look at it as set of equations. Meaning: $$\vec l = \begin{pmatrix} \vec S_x + d \vec t_x \\ \vec S_y + d \vec t_y \\ \vec S_z + d \vec t_z\end{pmatrix} \rightarrow \vec l = \vec v \rightarrow \begin{matrix} \vec S_x + d \vec t_x = x \\ \vec S_y + d \vec t_y = y \\ \vec S_z + d \vec t_z = f(x, y) \end{matrix}$$

• First question: what is $\vec S$ vs. $S$? And do you want $d$ in terms of $x$ and $y$ such that $\vec v = \vec l$? (Or something else?) In general, such a $\vec v$ is a curve parametrized by $x$ and $y$. It is possible that your line and your curve do not intersect. (For example, if $\vec v$ parametrizes a line parallel to $\vec l$). Furthermore, $\vec v'$ is not necessarily more general than $\vec v$, since it is only parametrized by one variable, $t$. – artificial_moonlet Sep 23 '15 at 14:15
• Hopefully erased the confusion with $S$ and $\vec S$. They were meant to be components of $\vec S$. I wish to find d given line $\vec l$ and curve $\vec v$ defined above as a function of one or two variables in Cartesian room. It is possible, that they do not have an intersection point in case I would like to know that there exists no solution if possible. Furthermore it is possible to restrict the d to be non-negative if it is any help. – Joonatan Samuel Sep 24 '15 at 10:42