5
$\begingroup$

I saw the accepted answer to the question: Finding a point along a line a certain distance away from another point!

I am not getting how to use it actually to find the coordinates of the new point at a given distance. This is because I am confused between how to translate to/from the Cartesian system and the vector system. So please explain me the following by walking through the solution suggested in that answer with the following example data.

Suppose I have two points $(0,0)$ and $(1,1)$ and I want to find a point at a distance which is 3/5th of the total distance between the points (i.e. $\frac{3}{5}\sqrt{2})$ from the point $(0,0)$ and lies on the segment.

How do I use the vectors mentioned in the solution given there to find the required coordinates?

Edit: Precisely speaking, What I do expect is the explanation of:

  1. What is vector $\mathbf v$ there if $(x_1,y_1) = (1,1)$ and $(x_0,y_0) = (0,0)$

  2. What is the normalized vector $d\mathbf u$?

  3. How do I do the addition $(x_0,y_0) + d\mathbf u$?

$\endgroup$

2 Answers 2

4
$\begingroup$

We have $\mathbf v = (x_1,y_1)-(x_0,y_0) = (1,1)-(0,0)=(1,1)$. Note that its length (or norm) is: $$ ||\mathbf v|| = \sqrt{v_1^2+v_2^2} = \sqrt{1^2+1^2}=\sqrt{2} $$ Thus, normalizing the vector yields: $$ \mathbf u = \frac{\mathbf v}{||\mathbf v||} = \frac{1}{\sqrt{2}}(1,1) $$ Since we want the point that is at a distance that is three-fifths the total distance between the two points, we have $d=\dfrac{3}{5}||\mathbf v||=\dfrac{3\sqrt{2}}{5}$. Hence, the desired point is: $$ \begin{align*} (x_0,y_0)+d\mathbf u &= (0,0)+\dfrac{3\sqrt{2}}{5}\left(\frac{1}{\sqrt{2}}(1,1)\right)\\ &= (0,0)+\dfrac{3}{5}(1,1) \\ &= (0,0)+(3/5,3/5)\\ &=\left(\dfrac{3}{5},\dfrac{3}{5}\right) \end{align*} $$

$\endgroup$
1
$\begingroup$

All points between $(0,0)$ and $(1,1)$ are described as a convex combination of them. That is:

$$ (x, y) = (0,0)\alpha + (1,1)(1-\alpha)$$

where $0 \leq \alpha \leq 1$. If $\alpha = 0$, then $(x,y) = (1,1)$, while if $\alpha = 1$, then $(x,y) = (0,0)$.

We can rewrite the formula as follows:

$$(x,y) = (1,1)(1-\alpha)$$

You want to find a point $(x,y)$ such that

$$ \| (x,y) - (0,0) \| = \frac{3 \sqrt{2}}{5} $$

So...

$$ \| (x,y) - (0,0) \| = \| (x,y) \| = \| (1,1)(1-\alpha) \| = \sqrt{(1-\alpha)^2 + (1-\alpha)^2} = $$ $$ = \sqrt{2(1-\alpha)^2} = \frac{3 \sqrt{2}}{5} $$

Squaring both term, we get $$ 2(1-\alpha)^2 = \frac{9 \cdot 2}{25} $$ $$ 25(1-\alpha)^2 = 9 $$ $$ 25\alpha^2 -50 \alpha + 16 = 0 $$

Solutions are $\alpha = \frac{2}{5}$ and $\alpha = \frac{8}{5}$. Since $0 \leq \alpha \leq 1$, then $\alpha = \frac{2}{5}$ and hence

$$(x,y) = (1,1)(1 - \frac{2}{5}) = (\frac{3}{5}, \frac{3}{5})$$ is the point you are looking for.


$u$ is the normalized vector obtained as $u = (1,1) - (0,0)$, while $d$ is a distance. However, my solution does not need this vector.

$\endgroup$
1
  • $\begingroup$ du is the term used in that answer. $\endgroup$
    – Tem Pora
    Jun 22, 2013 at 9:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .