Calculate coordinates of a point with given distan

2019-06-07 04:08发布

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?

3条回答
Emotional °昔
2楼-- · 2019-06-07 04:49

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.

查看更多
Rolldiameter
3楼-- · 2019-06-07 04:51

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

enter image description here

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

查看更多
forever°为你锁心
4楼-- · 2019-06-07 04:58

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.

查看更多
登录 后发表回答