There are 2000+ points in a 3-D sapce (as picture 1) . The points are classified into 7 groups by K-Means methods.
the points in picture 1 are presented like this:
point_ID_1 x y z group_label
1 0.254 0.025 0.007 1
2 0.201 0.078 0.081 1
3 0.106 0.153 0.238 2
4 0.052 0.015 0.084 3
5 0.078 0.005 0.159 7
... ... ... ... ...
there are other 5000+ points in the same 3-D sapce (as picture 2) . The (x,y,z) of points in the picture 2 is different from the points in the picture 2. But their distribution ranges are very similar.
the point in picture are presented as :
point_ID_2 x y z
1 0.354 0.025 0.028
2 0.125 0.128 0.324
3 0.068 0.292 0.221
4 0.051 0.086 0.128
5 0.028 0.081 0.082
... ... ... ...
I want to label the points in the same region of picture 2 and picture 1 with the same label, as the picture 3 shows.
Noted that the points are not in the same surface but in a 3-D space
How can I do this? I searched the Internet for a long time but I didn’t find any solutions. Please help me. Thank you very much!
question from:
https://stackoverflow.com/questions/66062856/python-labeling-points-which-are-in-the-similar-region-of-a-3-d-coordinate-sys 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…