Home▸Algorithms & AI▸K-d Tree Nearest-Neighbour Star Catalogue Search Versus Brute Force

K-d Tree Nearest-Neighbour Star Catalogue Search Versus Brute Force

Finding the stars nearest to a telescope pointing among thousands of catalogue entries is a classic spatial-search problem. A k-d tree splits the star box by planes and skips every branch the search sphere cannot reach, so it examines a few dozen stars instead of all of them. Choose the catalogue size, star distribution, number of neighbours and a range radius, and watch a Blender-built refractor follow a moving pointing while the tree and brute force race. Checked against brute force, the Poisson nearest-neighbour distance and median, the tree depth floor(log2 N)+1 and logarithmic scaling.

Algorithms & AI3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
K-d Tree Nearest-Neighbour Star Catalogue Search Versus Brute Force ↗ Open standalone

Finding the stars nearest to a telescope pointing among thousands of catalogue entries is a classic spatial-search problem. A k-d tree splits the star box by planes and skips every branch the search sphere cannot reach, so it examines a few dozen stars instead of all of them. Choose the catalogue size, star distribution, number of neighbours and a range radius, and watch a Blender-built refractor follow a moving pointing while the tree and brute force race. Checked against brute force, the Poisson nearest-neighbour distance and median, the tree depth floor(log2 N)+1 and logarithmic scaling.

⚙ Under the hood

Finding the stars nearest to a telescope pointing among thousands of catalogue entries is a classic spatial-search problem. A k-d tree splits the star box by planes and skips every branch the search sphere cannot reach, so it examines a few dozen stars instead of all of them. Choose the catalogue size, star distribution, number of neighbours and a range radius, and watch a Blender-built refractor follow a moving pointing while the tree and brute force race. Checked against brute force, the Poisson nearest-neighbour distance and median, the tree depth floor(log2 N)+1 and logarithmic scaling.

K-d TreeNearest NeighbourSpatial SearchStar CataloguePoisson StatisticsComputational GeometryAlgorithms

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)