从距离矩阵中找到点的坐标 [英] Finding the coordinates of points from distance matrix

查看:41
本文介绍了从距离矩阵中找到点的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组点(带有未知坐标)和距离矩阵.我需要找到这些点的坐标以绘制它们并显示我的算法的解决方案.

I have a set of points (with unknow coordinates) and the distance matrix. I need to find the coordinates of these points in order to plot them and show the solution of my algorithm.

我可以在坐标 (0,0) 中设置这些点之一来简化,然后找到其他点.谁能告诉我是否可以找到其他点的坐标,如果可以,如何找到?

I can set one of these points in the coordinate (0,0) to simpify, and find the others. Can anyone tell me if it's possible to find the coordinates of the other points, and if yes, how?

提前致谢!

编辑忘了说我只需要x-y上的坐标

EDIT Forgot to say that I need the coordinates on x-y only

推荐答案

第一步,任意指定一个点P1为(0,0).

Step 1, arbitrarily assign one point P1 as (0,0).

第2步,沿x轴正方向任意指定一个点P2.(0, Dp1p2)

Step 2, arbitrarily assign one point P2 along the positive x axis. (0, Dp1p2)

第3步,找到一个点P3使得

Step 3, find a point P3 such that

Dp1p2 ~= Dp1p3+Dp2p3
Dp1p3 ~= Dp1p2+Dp2p3
Dp2p3 ~= Dp1p3+Dp1p2

并将该点设置在正"y 域中(如果它满足这些条件中的任何一个,则该点应放置在 P1P2 轴上).
使用余弦定律确定距离:

and set that point in the "positive" y domain (if it meets any of these criteria, the point should be placed on the P1P2 axis).
Use the cosine law to determine the distance:

cos (A) = (Dp1p2^2 + Dp1p3^2 - Dp2p3^2)/(2*Dp1p2* Dp1p3)
P3 = (Dp1p3 * cos (A), Dp1p3 * sin(A))

您现在已经成功构建了一个正交空间并在该空间中放置了三个点.

You have now successfully built an orthonormal space and placed three points in that space.

第 4 步:要确定所有其他点,请重复第 3 步,为您提供一个暂定的 y 坐标.(Xn, Yn).
将距离 {(Xn, Yn), (X3, Y3)} 与矩阵中的 Dp3pn 进行比较.如果相同,则您已成功识别点 n 的坐标.否则,点 n 在 (Xn, -Yn).

Step 4: To determine all the other points, repeat step 3, to give you a tentative y coordinate. (Xn, Yn).
Compare the distance {(Xn, Yn), (X3, Y3)} to Dp3pn in your matrix. If it is identical, you have successfully identified the coordinate for point n. Otherwise, the point n is at (Xn, -Yn).

请注意,第 4 步还有一个替代方法,但对于星期六下午来说,数学太多了

Note there is an alternative to step 4, but it is too much math for a Saturday afternoon

这篇关于从距离矩阵中找到点的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆