
[ two animations of Flood Fill algorithms by Andre Karwath ]
It turns out that two things are true:
- Shopping at McMaster Carr can actually be good research, you will find the latest range here
- The Paint Bucket tool in Photoshop and web surfing are quite similar
Too complicated to explain why, but the McMaster site led me to Dijkstra’s algorithm, a method for determining the shortest distance between two points within a graph of many points. Below is an animation by Steven Skiena showing the algorithm:

Dijkstra’s algorithm is used for sending packets over the internet (finding the shortest path of cable to send information) and possibly for route finding on Google Maps (pure conjecture).
The Paint Bucket uses a related algorithm called Flood Fill, Seed Fill, or Boundary Fill. The animations at the top of the post show Flood Fills that look in four directions (left) and eight (right). There are lots of other variations of the Flood Fill that work in different ways, mainly in how many times they repeat pixels.
The actual implementation of the algorithms is way beyond me, but the connection between routing of information and drawing in the computer is fascinating.