Calculate coordinates of a point with given distances to two other points

匆匆过客 提交于 2020-01-23 18:37:29

问题


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?


回答1:


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

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.




回答2:


If you don't place any further restrictions to the distances, your question is equivalent to "how to find the intersection of 2 circles":

http://mathworld.wolfram.com/Circle-CircleIntersection.html

Therefore, as Howard pointed out, there will be 0, 1, or 2 intersections points fulfilling the conditions you placed.




回答3:


You can use the distance formula (basically Pythagorean theorem) to find the distance between any two points on a coordinate plane.

http://www.purplemath.com/modules/distform.htm



来源:https://stackoverflow.com/questions/5370356/calculate-coordinates-of-a-point-with-given-distances-to-two-other-points

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!