我有三个具有x和y值的点。实际上我想要的是向量的位置(请参考提供的图片)。 你能帮我吗?我已经尝试使用atan2和平行四边形,但遗憾的是没有成功。
我有三个具有x和y值的点。实际上我想要的是向量的位置(请参考提供的图片)。 你能帮我吗?我已经尝试使用atan2和平行四边形,但遗憾的是没有成功。
我再次提醒,可能有些遗漏,但是我认为这是向量的简单加法:
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)
一般而言,找到两条直线夹角的平分线方程。
设这两条直线的方程为a1x + b1y+ c1 = 0和a2x + b2y + c2 = 0。
平分线是一个点的轨迹,该点移动时,从它到两条给定直线的垂线相等。
平分线的方程为
a1x+b1y+c1/√a12+b12 = + a2x+b2y+c2/√a22+b22。
只需将这些方程适用于您的特定情况即可。