Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 2D 中有两个点
//Point1 has velocity vX = 100; vY = 50; posX = 300; posY = 100; //Point2 has velocity vX = -20; vY = 80; posX = -800; posY = 1000;
另外我有一个点直接放在这两个点的中间,我如何计算这个中间点的速度?
通过确定它的 vX 和 vY 是什么。
它的 x 和 y 是
x = (-800 - 20 * t + 300 + 100 * t) / 2 y = (1000 + 80 * t + 100 + 50 * t) / 2
简化
x = -250 + 40 * t y = 550 + 65 * t
所以它的 vX 是 40,它的 vy 是 65。我的朋友毕达哥拉斯告诉我这里的速度是sqrt((40 * 40) + (65 * 65))或大约76 个单位每滴答声。
sqrt((40 * 40) + (65 * 65))