1
$\begingroup$

I have the following image:

enter image description here

I want to know the direction of orange arrow given the two points, I know that if the direction is (0, -1) the orange will be pointing up, but how can I get the direction given this points?

  • 0
    do you want to know the direction vector? the direction of the orange arrow is the same as the direction from A to B. So, you have to form a vector AB.2012-04-05

1 Answers 1

2

You can compute the direction vector as follows $v := \frac{b - a}{\|b - a\|}$ where $\|\cdot\|$ denotes the Euclidean norm.

You'll get $b - a = (-10, -60)$ and $\|b - a\| = \sqrt{ (b_1-a_1)^2 + (b_2-a_2)^2} = \sqrt{(-10)^2 + (-60)^2} = \sqrt{3700}$ and hence the direction vector

$ \left ( \begin{array}{c}\frac{-10}{\sqrt{3700}} \\ \frac{-60}{\sqrt{3700}} \end{array} \right )$