問題描述
我需要根據距離繪制一組點.我有三個未知點 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 question 但我得到了一組不同的距離,并且不限于原始點數.
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.
推薦答案
我假設您使用 2D 空間
如果是1D,那么2分就足夠了(不完全相同!!!).
If it is 1D then 2 points are enough (not identical !!!).
如果2D那么3個距離就足夠了但是使用的點必須不能在同一條線上!!!
If 2D then 3 distances is enough but the points used must not lay on the same line !!!
情節的位置/方向
如果您還想要確切的方向和位置,則相對繪圖已滿足上述條件,那么您需要知道前 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.
- 知道 1 點消除偏移
- 知道 2 點可以消除旋轉
- 知道 3 點消除鏡像
[注釋]
n-D
坐標系需要n+1
個點
[edit1] 方程
原始問題文本不包含任何需要的方程式,但評論需要它,所以這里有一些:
original question text did not contain any equations need but comments requires it so here are some:
您將需要兩個超球體之間的交點(在 2D 圓中,在 3D 球體中,...)所以看這里:
You will need intersection point between two hyperspheres (in 2D circles, in 3D spheres,...) so look here:
- 圓-圓交點
以每個點為圓心,半徑等于距該點的距離.找出所有圓組合之間相同的交點(0,1),(0,2),(1,2)
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)
黃色交點在所有 3 種組合中都是相同的,所以這是下一個點,或者對于 2D,只需解決這個系統:
Yellow intersection is the same in all 3 combinations so that is the next point or for 2D just solve this system:
(x-x0)^2+(y-y0)^2=l0^2
(x-x1)^2+(y-y1)^2=l1^2
(x-x2)^2+(y-y2)^2=l2^2
其中x,y
是交點,xi,yi
是圓心,li
是到該點的距離.
where x,y
is the intersection point, xi,yi
are center of circle and li
is distance from that point.
如果操作正確,第一個選項應該更簡單、更準確,但需要一些矢量和三角數學知識.您將需要在矢量上添加旋轉或計算,并在 2D
The first option should be simpler and more accurate if done right but need some knowledge on vector and trigonometry math. You will need to add rotation or compute on vectors and use perpendicular vector feature in 2D
V(x,y) -> V0(+y,-x),V1(-y,+x)
其中V0,V1
垂直于V
這篇關于Java:基于距離的繪圖點的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!