If we have defined vectors $u$, $v$, $w$ and $r$, is there any elegant way to describe vector $s$ which lies on the intersection of lines created by pairs of vectors $(u, v)$ and $(w, r)$?
1 Answers
It has been a long time since I've approached such problems (so hopefully I don't make some trivial errors!) but I would think it would involve considering the following:
Based on your diagram you have two lines which move in the directions: $\tilde{w}-\tilde{r}$ and $\tilde{v}-\tilde{u}$, and they intersect at some vector $\tilde{s}$.
The vector representation of these lines are:
$L_1 = \tilde{v} + \lambda_1 \tilde{d}_1$
$L_2 = \tilde{w} + \lambda_2 \tilde{d}_2$
where $\lambda_1, \lambda_2$ are scalars, and $\tilde{d}_1$ and $\tilde{d}_2$ run parallel to the lines. These can be represented as $\tilde{d}_1 = \tilde{v}-\tilde{u}$ and $\tilde{d}_2 = \tilde{w}-\tilde{r}$, so that,
$L_1 = \tilde{v} + \lambda_1 (\tilde{v}-\tilde{u})$
$L_2 = \tilde{w} + \lambda_2 (\tilde{w}-\tilde{r})$
Thus we have two vector representations of our lines.
Thus since $\tilde{s}$ is where they intersect, you are looking for lambda values where $L_1 = L_2$. In otherwords $\tilde{s}$ is found by solving $\tilde{v} + \lambda_1 (\tilde{v}-\tilde{u}) - (\tilde{w} + \lambda_2 (\tilde{w}-\tilde{r})) = \tilde{0}$, for $\lambda_1$ and $\lambda_2$.
I'm not sure how much stronger of a representational form you are looking for.
- 902
- 4
- 17
-
While this is valid and it helped me ( https://math.stackexchange.com/a/406895/686720 was also pretty elegant), I'm interested if there is any way to express it using "vector operations" like lerp, products, etc., while still being compact. – ValentaTomas Oct 03 '19 at 20:27
-
What is a lerp? And I'm not sure how elegant is your definition of elegant. Moreover that other link you show and my post can be almost the same thing. You just have to replace $\tilde{v}$ by $\tilde{v} = [v_1,v_2]$ and then solve a linear algebra system for $\lambda_1$ and $\lambda_2$ – tisPrimeTime Oct 03 '19 at 23:18
-
Also if possible you are happy / OK with my answer could you mark it as accepted? Thanks. :) – tisPrimeTime Oct 03 '19 at 23:19