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.
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.
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.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install