Alex Chew has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use Tk; $top=MainWindow->new(); $canvas=$top->Canvas(width=>300, height=>245)->pack(); $origin_x=110; $origin_y=70; $PI=3.141592635; $circle_radius=5; $path_radius=0; for ($angle=0; $angle<=180; $path_radius+=7, $circle_radius+=3, $angle ++=10) { $path_x=$origin_x+$path_radius*cos($angle*$PI/90); $path_y=$origin_y-$path_radius*sin($angle*$PI/90); $canvas->create('oval', $path_x-$circle_radius, $path_y-$circle_radius, $path_x+$circle_radius, $path_y+$circle_radius, -fill=>'yellow'); $canvas->create('line', $origin_x, $origin_y, $path_x, $path_y, -fill=>'slategray'); sleep(1); } MainLoop();
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Animation Display appling Delay and Canvas Object
by atcroft (Abbot) on May 19, 2006 at 04:20 UTC | |
Re: Animation Display appling Delay and Canvas Object
by bbfu (Curate) on May 19, 2006 at 04:06 UTC | |
Re: Animation Display appling Delay and Canvas Object
by zentara (Cardinal) on May 19, 2006 at 11:46 UTC |