计算与其他两个点的给定距离的一个点的坐标 [英] Calculate coordinates of a point with given distances to two other points
本文介绍了计算与其他两个点的给定距离的一个点的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我有三个点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.
这篇关于计算与其他两个点的给定距离的一个点的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文