Image:Recursive Flood Fill 8 (aka).gif

From Wikipedia, the free encyclopedia

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.
Description
English: This image shows the running recursive flood fill algorithm with eight directions. This animation has been generated using the Perl script below.
Deutsch: Dieses Bild zeigt den Ablauf des Floodfill-Algorithmus mit acht Richtungen. Die Animation wurde mit untenstehender Perl-Funktion erzeugt.
Français : Cette image illustre l'exécution récursive de l'algorithme de remplissage par diffusion dans sa variante 8-connexe. Cette animation a été générée à l'aide du script Perl ci-dessous.


...
 
 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);
    }
 }
 
 ...
Please help translating the description into more languages. Thanks a lot!

If you use this image outside of the Wikimedia projects, I'd be happy to hear from you. If you want a license with the conditions of your choice, please email me to negotiate terms.

best new image
image

Source

own work

Date

2005-12-27

Author

André Karwath aka Aka

Permission
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

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current21:18, 27 December 2005144×144 (3 KB)Aka
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):