위키백과 ― 우리 모두의 백과사전.
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);
}
}
...
그림 고리
다음 문서들이 이 그림을 사용하고 있습니다: