Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the vector between two vectors?

I have three points with x and y values to start with. What I actually want is the position where the actual vector would go (look at image provided). Can you help me ? I tried around a little bit with atan2 and parallelograms, but unfortunately without success.

Image

like image 737
the_critic Avatar asked Jul 10 '12 16:07

the_critic


People also ask

How do you find the vector between two points?

To find the directional vector, subtract the coordinates of the initial point from the coordinates of the terminal point.

What is the formula for difference of two vectors?

The difference of two vector x=b−a is formed by placing the tails of the two vectors together. Then, the vector x goes from the head of a to the tail of b.


1 Answers

Again, I'll remind that I might be missing something, but I think this is pretty simple addition of vectors:

let point A be (700, 500)
let point B be (400, 400)
let point C be (650, 100)
let point D be (???, ???)

the vector from A to B is: (-300, -100) // i.e. x = B-A, 400 - 700, etc
the vector from A to C is: (-50, -400)
Adding these together yields the vector from A to D: (-350, -500).
Adding that vector to point A yields the coordinates of the point D: (350, 0)
like image 158
Chris Trahey Avatar answered Sep 16 '22 19:09

Chris Trahey