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.
To find the directional vector, subtract the coordinates of the initial point from the coordinates of the terminal point.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With