计算与其他两个点的给定距离的一个点的坐标

问题描述:

如果我有三个点A,B,C,并且我知道它们之间的距离是在2D坐标{0,0}上,而B在{ab,0}上,那么找到该点的公式是什么点C的坐标?

If I have three points A, B, C and I know the distances between them and A is at 2D coordinates {0,0} and B is at {ab,0}, then what would be the formula to find the coordinates of the point C?

要点{cx, cy}必须解决两个方程式:

The point {cx, cy} has to solve two equations:

cx^2+cy^2==ac^2 && (cx-ab)^2+cy^2==bc^2

=> cx^2-(cx-ab)^2==ac^2-bc^2
=> 2*cx*ab==ac^2-bc^2+ab^2

=> cx = (ac^2-bc^2+ab^2)/(2*ab)

=> cy = +/- sqrt(ac^2-cx^2)   iff ac^2-cx^2 > 0
=> cy = 0   iff ac^2-cx^2 = 0
=> no solution    else

有两个点都具有所需的距离.但是基于ac^2-cx^2,可能也只有一种解决方案,甚至根本没有.

There are either two points which both have the desired distances. But based on ac^2-cx^2 there may also be only one solution or none at all.