Java:基于距离绘制点 [英] Java: plot points based on distances

查看:299
本文介绍了Java:基于距离绘制点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要根据距离绘制一组点。我有三个未知点X,Y和Z.然后我得到另一个未知点(A)及其与原件(AX,AY,AZ)的距离。我会继续得到点和距离(B,BX,BY,BZ; C,CX,CY,CZ)等。

I need to plot a group of points based on distances. I have three unknown points X, Y, and Z. I then get another unknown point (A) and its distances from the originals (AX, AY, AZ). I will continue getting points and distances (B, BX, BY, BZ; C, CX, CY, CZ) etc.

我的问题是,的点。如果是这样,我需要多少点才能得到精确的绘图图?

My question is whether its possible to plot all of the points. If so, how many points would I need for an exact plot map? What about an approximate map?

这类似于这个问题,但我得到一组不同的距离,并不限于原点数。

This is similar to this question but I get a different set of distances and am not limited to the original number of points.

另外,如果它会帮助我可以添加更多的点到X,Y,Z组,这将给我更多的距离A,B等。我不知道,直到它是以某种方式计算的任何距离XY ,XZ,YZ,AB,AC等。

Also, if it would help I could add more points to the X, Y, Z group which would give me more distances for A, B, etc.What I don't know until it's been somehow calculated are any of the Distances XY, XZ, YZ, AB, AC, etc.

推荐答案


  1. 2D空间

  1. I assume you use 2D space


  • 如果是1D,则2分就足够了(不一样!!!)

  • 2D ,然后 3个距离就够了,但所使用的点必须不在同一行!

  • if it is 1D then 2 points are enough (not identical !!!)
  • if 2D then 3 distances is enough but the points used must not lay on the same line !!!

情节的位置/方向



  • 知道1点消除偏移

  • li>知道2点消除旋转

  • 知道3点消除镜像

  • for relative plot are above conditions enough
  • if you want also the exact orientation and position
  • then you need to know exact position of first 3 points
  • otherwise your plot will look the same but can be offseted,rotated and mirrored to original geometry
  • knowing 1 point eliminates offset
  • knowing 2 point eliminates rotation
  • knowing 3 point eliminates mirroring

[notes]


  • 您需要 n + 1 nD 坐标系的点

  • you need n+1 points for n-D coordinate system

/ strong>

[edit1] equations


  • 原始问题文字未包含任何方程式,但需要注释,因此这里有一些:

  • 您将需要2D球体,3D球体中的两个超球体之间的交叉点


    • ...

    • look here: circle-circle intersection

    • 从每个点作为中心投射圆形,其半径等于从该点开始的距离

    • 找到所有圆形组合之间相同的交叉点(0,1), ,2),(1,2)

    • 黄色交集在所有3种组合中是相同的,因此是下一个点

    • original question text did not contain any equations need but comments require it so here are some:
    • you will need intersection point between two hyperspheres
      • in 2D circles, in 3D spheres,...
      • look here: circle-circle intersection
      • cast circle from each point as center with radius equal to the distance from that point
      • find out intersection point that is the same between all combinations of circles (0,1),(0,2),(1,2)
      • Yellow intersection is the same in all 3 combinations so that is the next point

      • (x-x0)^ 2 +(y-y0)^ 2 = l0 ^ 2

      • (x-x1)^ 2 +(y-y1)^ 2 = l1 ^ 2

      • (x-x2)^ 2 +(y-y2)^ 2 = l2 ^ 2



      • xi,yi是圆的中心

      • li是与该点的距离
      • / li>
      • 第一个选项应该更简单和更准确,如果正确

      • 但需要一些关于向量和三角学数学的知识

      • 您需要在向量

      • 上添加旋转或计算,并在2D V(x,y) - > V0(+ y,-x),V1 -y,+ x)

      • 其中V0,V1垂直于V

      • (x-x0)^2+(y-y0)^2=l0^2
      • (x-x1)^2+(y-y1)^2=l1^2
      • (x-x2)^2+(y-y2)^2=l2^2
      • where x,y is the intersection point
      • xi,yi is center of circle
      • li is distance from that point

      这篇关于Java:基于距离绘制点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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