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

标签 vector position

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

Image

最佳答案

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

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)

关于vector - 如何获得两个向量之间的向量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11417626/

相关文章:

c++ - 在指向 vector 的智能指针上使用 push_back() 时出现运行时错误

html - 组织 div 元素

CSS 图像 Sprite - 属性值无效

Java - Vector 类中的删除方法始终返回 True

c++ - 包含对象的结构 vector

r - 将特征向量折叠为 R 中的单个观察

xml - 使用 xpath 查找节点在节点集中的位置

javascript - 如何将 map 位置(lat,lng)对转换为 mapbox 中的屏幕位置(x,y)对

CSS 页面位置问题

java - 在 Java 中缩放数组的最有效方法?