8 Queens Problem
Abhivadaye
Anagram Finder
Bouncing Spheres
Break Out
Classic Snake
Cycloids
Deflection Demo
Double Pendulum
EV Savings
Flocking
Fog fly through
Forces on Objects
Fractals
Game of Life
Horizontal Stars
Image Scanning
JSON Beautify
Julia Sets
Kaleidoscope
Kock Fractals
Lorenz Attractor
Mandlebrot Set
Meta Balls
Natural Flocking
Number Convert
Number Game
Pandemic Simulator
Particles & Nodes
Perlin Noise
Poisson Disk
QuadTree Search
Ripples
Set Demonstration
Sierpiński Triangles
Simple Pendulum
Sine Waves
Starfield
Super Shapes 2D
Target Finder
Tic Tac Toe
Voronoi Diagram
Who Moved My...
Quad Tree
A quadtree is a tree data structure in which each internal node has exactly four children.
Originally within databases for storing data in an easily searchable manner, it can also be used to find pixels in
a 2D plane. Here's a demonstration of just that.
13 Oct 2020
In the canvas(right) below we have a bunch of points (colored Black) randomly scattered across. A quadtree is built in such a manner that each point is assigned at least one block of the quadtree. The quadtree's search functionality makes it easier to find the point closest (colored Red) to the mouse (colored Blue).
Quadtree searches are O(log n) searches as opposed to brute force searches that are O(n). There are two canvas below. The left one is a brute force search. The right one is QuadTree.