Image:Recursive Flood Fill 8 (aka).gif

From Wikipedia, the free encyclopedia

No higher resolution available.

Recursive_Flood_Fill_8_(aka).gif (144 × 144 pixel, file size: 3 KB, MIME type: image/gif)

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is attempting to create a freely licensed media file repository. You can help.

Recursive Flood Fill

This image shows the running recursive flood fill algorithm with eight directions.

  • Creator André Karwath aka Aka
  • Date 2005-12-27


This animation has been generated using the following Perl function:

...

sub FloodFill8
{
   my ($x, $y) = @_;
   
   if ($im->getPixel ($x, $y) == $colfill)
   {
      $im->setPixel ($x, $y, $colpen);
      WriteImage ();

      FloodFill8 ($x, $y+1);
      FloodFill8 ($x, $y-1);
      FloodFill8 ($x+1, $y);
      FloodFill8 ($x-1, $y);
      FloodFill8 ($x+1, $y+1);
      FloodFill8 ($x+1, $y-1);
      FloodFill8 ($x-1, $y+1);
      FloodFill8 ($x-1, $y-1);
   }
}

...
Creative Commons License
Creative Commons Attribution iconCreative Commons Share Alike icon
This file is licensed under the Creative Commons Attribution ShareAlike 2.5 License. In short: you are free to share and make derivative works of the file under the conditions that you appropriately attribute it, and that you distribute it only under a license identical to this one. Official license

The following pages on the English Wikipedia link to this file (pages on other projects are not listed):