k-NN Query
This demo presents the real-time capabilities of the implemented k-NN algorithm in a simple non-interactive game. Moreover, it indicates 3D R-tree's indexing performance and potential detection of moving objects in 3D space. The game creates an unstoppable shower of 9 asteroids heading towards Earth every 1s. Their position is automatically indexed every 50ms to a 3D R-tree instance, which is inquired to discover the k-closest of them compared to Earth's coordinates (0, 0, 0). When these asteroids enter a predefined maximum effective range of defense, a nuke is launched against it for its extermination.
Display the MBBs of the generated 3D R-tree instance:
Pause / Resume asteroids shower and spatial indexing:
Note The remaining asteroids will still keep heading towards Earth!!!
Display the Maximum Effective Range:
Asteroids Takedowns:
Define the desired k-NN asteroid(s) to shoot:
Hint! Low sample will ultimately lead to asteroids' landing on Earth. On the other hand, even though that defining a high sample means more nukes, a 9-NN or higher sample would be an overkill!