7

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

图片

4

2 回答 2

10

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

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)
于 2012-07-10T16:32:21.447 回答
0

一般来说,求直线夹角平分线的方程

a1x + b1y + c1 = 0 和 a2x + b2y + c2 = 0。

平分线是一个点的轨迹,它移动使得从它到两条给定线的垂线相等。

平分线方程是

a1x+b1y+c1/√a12+b12 = + a2x+b2y+c2/√a22+b22。

只需根据您的具体情况调整这些方程即可。

于 2012-07-10T16:27:47.777 回答