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

编程入门 行业动态 更新时间:2024-10-28 09:14:36
本文介绍了如何获得两个向量之间的向量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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.

推荐答案

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

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)

更多推荐

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

本文发布于:2023-06-11 17:32:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/639820.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:向量   如何获得   两个

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!