D
Daniel Moore
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The three rules of Ruby Quiz:
1. Please do not post any solutions or spoiler discussion for this
quiz until 48 hours have elapsed from the time this message was
sent.
2. Support Ruby Quiz by submitting ideas and responses
as often as you can!
Visit: <http://rubyquiz.strd6.com/suggestions>
3. Enjoy!
Suggestion: A [QUIZ] in the subject of emails about the problem
helps everyone on Ruby Talk follow the discussion. Please reply to
the original quiz message, if you can.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
## Flood Fill Visualization (#201)
Bonjour Rubyists,
This week's quiz comes from [Martin DeMello][1]
[Flood fill][2] is a simple algorithm that colours in a connected
region of a bitmap. The algorithm looks for all nodes which are
connected to the start node by a path of the target color, and changes
them to the replacement color. (Check out the Wikipedia page for more
information.)
While simple, the algorithm is pretty satisfying to watch in action,
which brings us to the quiz: have a program accept a bitmap and a
starting point, and animate the algorithm as it floodfills the region
containing that point.
Have Fun!
[1]: http://zem.novylen.net
[2]: http://en.wikipedia.org/wiki/Flood_fill
The three rules of Ruby Quiz:
1. Please do not post any solutions or spoiler discussion for this
quiz until 48 hours have elapsed from the time this message was
sent.
2. Support Ruby Quiz by submitting ideas and responses
as often as you can!
Visit: <http://rubyquiz.strd6.com/suggestions>
3. Enjoy!
Suggestion: A [QUIZ] in the subject of emails about the problem
helps everyone on Ruby Talk follow the discussion. Please reply to
the original quiz message, if you can.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
## Flood Fill Visualization (#201)
Bonjour Rubyists,
This week's quiz comes from [Martin DeMello][1]
[Flood fill][2] is a simple algorithm that colours in a connected
region of a bitmap. The algorithm looks for all nodes which are
connected to the start node by a path of the target color, and changes
them to the replacement color. (Check out the Wikipedia page for more
information.)
While simple, the algorithm is pretty satisfying to watch in action,
which brings us to the quiz: have a program accept a bitmap and a
starting point, and animate the algorithm as it floodfills the region
containing that point.
Have Fun!
[1]: http://zem.novylen.net
[2]: http://en.wikipedia.org/wiki/Flood_fill