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

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

问题描述

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

我可以在坐标(0,0)中设置其中一个点来简化,并找到其他点。任何人都可以告诉我,如果有可能找到其他点的坐标,如果是,如何?



预先感谢!



编辑
忘了说我需要xy上的坐标第1步,任意地将一个点P1分配为(0,0)。步骤2,沿着正x轴任意分配一个点P2。 (0,Dp1p2)



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

  Dp1p2〜= Dp1p3 + Dp2p3 
Dp1p3〜= Dp1p2 + Dp2p3
Dp2p3〜= Dp1p3 + Dp1p2

并将该点设置在正y域中(如果它符合这些标准中的任何一个,则该点应放置在P1P2轴上)。

使用余弦定律(A)=(Dp1p2 ^ 2 + Dp1p3 ^ 2 -Dp2p3 ^ 2)/(2)确定距离:b
$ b

  cos * Dp1p2 * Dp1p3)
P3 =(Dp1p3 * cos(A),Dp1p3 * sin(A))

您现在已经成功建立了一个正交空间并在该空间中放置了三个点。步骤4:要确定所有其他点,请重复步骤3,给你一个试探性的y坐标。
(Xn,Yn)。

比较矩阵中的距离{(Xn,Yn),(X3,Y3)}到Dp3pn。如果相同,则已成功标识点n的坐标。否则,点n在(Xn,-Yn)。

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

p>

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.

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?

Thanks in advance!

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

解决方案

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

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

Step 3, find a point P3 such that

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

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.

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).

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

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

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