use strict; use GD; my $width = 500; my $height = 500; my $image = GD::Image->new($width, $height); my $black = $image->colorAllocate(0, 0, 0); my $white = $image->colorAllocate(255, 255, 255); $image->transparent($white); foreach (0..200) { $image->setPixel($_, &y($_), $black); open OUT, "> movie\\move" . (sprintf "%03d", $_) . ".png"; binmode OUT; print OUT $image->png; close OUT; } sub y { my $x = shift; $x %= 50; return $height-(-(100/625)*($x-25)*($x-25)+100); }