如何获得两个向量之间的向量?

the*_*tic 5 position vector

我有三个点,x和y值开头.我真正想要的是实际矢量的位置(看图像提供).你能帮助我吗 ?我尝试了atan2和平行四边形,但不幸的是没有成功.

图片

Chr*_*hey 8

再次,我会提醒我可能会遗漏一些东西,但我认为这是非常简单的向量添加:

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)
Run Code Online (Sandbox Code Playgroud)