Home /  Sketchbook /  p5.js - Common Examples - Quadtree
  • Info

Overview

This is a p5.js sketch to demonstrate an implementation of a Quadtree data structure.

Controls

Mouse

  • Click - Adds a new point to the Quadtree based on the mouse’s current location.
  • Move - Highlights the points in a rectangle centered around the mouse.

References:

  • Wikipedia - Quadtree
  • Coding Train Episode 98.1 98.2

Links:

  • Live View
  • Source on Github

Screenshot:

screenshot