3D Math - hold positions only in a certain number of yards

I am trying to determine from a wide range of positions how to significantly narrow the list.

I currently have about 3,000 positions (x, y, z), and I want to basically keep the positions farthest from each other (I do not need to save 100 positions that are within 2 yards of each other) .

Also, to make brute force and literally make comparisons of 3000 ^ 2, does anyone have any ideas how I can narrow this list down further?

I am a little confused about how I should approach this from a mathematical point of view.

+5
source share
1 answer

, , . , .

:

  • 3D- . X .
  • [x, y, z], .
  • , (x, y, z), NULL
  • , , .
    • ? , , (5.5, 8.2, 9.1) MyCubes [5,8,9], , X ( ) 1. . / , .
  • , . : MyCubes [5,8,9] == NULL ( ) ( , , , )

, .

, , ?

-, Grid-Cube (5,8,9) .

 If MyHashTable.contains({5,8,9}) then DoNothing else InsertCurrentVertex(...)

( . ? , /, .contains HashTable ( )

, !

, , . X- , , , - ( ).

, ? , ( !).

, , :

 If Not ThisCubeIsTaken()
    For each SurroundingCube
      If not Is_Your_Vertex_Sufficiently_Far_Away_From_Me()
         exit_loop_and_outer_if_statement()
      end if
    Next
    //Ok, we got here, we can add the vertex to the current cube because the cube is not only available, but the neighbors are far enough away from me
 End If

, , , , , 3D-.

, , , , " , 0,25X" - . , .

, ,

, .

 If TheCube is empty OR if ThisVertex is closer to the center of TheCube than the Cube current vertex
    InsertVertex (overwrite any existing vertex in the cube
 End If

: . .

, .

-

10% , . , , . . , .

+7

All Articles