Skip to content

jamylak/nearestneighbour01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nearest Neighbour Visual Lab

This visualisation uses AI Generated code, finetuned for the best visualisation, not code quality

nearestneighbour.mov

Interactive Raylib lab for comparing nearest-neighbour spatial data structures, with animated builds, live query traversal, and a movable code inspector linked to the current search state.

What This Visualisation Shows

  • How QuadTree and KD-tree structures partition the same point set differently
  • How a nearest-neighbour query walks the structure and prunes space
  • How presets and speed controls change the path you see on screen
  • How the linked inspector connects visual traversal to source-level logic

Visual Map

flowchart LR
    A["Point Set"]
    B["Build Spatial Index"]
    C["Move Query Point"]
    D["Traverse Candidate Regions"]
    E["Prune Unneeded Branches"]
    F["Nearest Result"]

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F
Loading

Controls

  • q: quit
  • a: switch algorithm
  • p: cycle point presets
  • r: reset the current build/query animation
  • space: pause or resume
  • mouse move: drive the nearest-neighbour query

Run

make run

About

Nearest Neighbour Algorithm Visualisations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages