Algorithms & EmergenceAlgorithms
The Paint Bucket
Filling a shape is a graph search in disguise
One click fills a shape perfectly, until one missing pixel floods the whole picture. How does the paint bucket know where to stop?
You'll find out
- How paint finds every connected pixel
- Why one pixel can flood everything
- What paint has to do with islands
Why it matters
Paint buckets, magic wands, game maps and island counts all run on one simple search through neighbors.
Play this lesson
Free to play in your browser or on iPhone