requirements : (eek, I don't like that word either)
- a code wrap set to 85 if you want to see this nice in your perlmonks window
- your favorite unix-like system
- a virtual console with the font set to the smallest possible
- a deckchair and some gazeous drink you like, possibly with a straw
#!/usr/bin/perl use strict; $|=1;$/= undef;my$q ;open$q,"< $0";my$Qq= <$q>;close$q; my$wQ=3.1416; my$QQq=$wQ/10; my$Q=(sub{$$ eq $~})->($wQ);my $qQ=$Q++||--$Q; $q++;my$K=[()]; while($Qq=~m{( [^\n]*)\n}gx){ $K->[$Q]=[split '',$1];my$l = length$1;$qQ= 0+$l if($l>$qQ );++$Q;}my$QqQ =$qQ/2;my$qQQ =$Q*0.6;my $qQq =[ map {tan($_)+1}(grep {!($QqQ+$qQQ)}($q ,$qQ,$QQq))];my$k= int(2*$wQ/$QQq-1);$q =4;my$qqq=0unless 0;for my $kc(0..$k){$q--; my$Cq=cos( $qqq);my$ cK=sin($qqq);for my$Kq(0..$qQ -1){for my$C(0.. $Q-1){my$QqqQ =$Kq-$QqQ;my$Qk=$C -$qQQ;my$kk=int($Cq* $QqqQ-$cK *$Qk+$QqQ+0.5);my$cc=int ($cK*$QqqQ+$Cq*$Qk+$qQQ +0.5);$qQq->[$kc]->[$cc]->[$kk]=$K->[ $C]->[$Kq]if($kk>0&&$cc >0); }}$qqq+=$QQq;print'.';}f +or my$kc(@$qQq){--$q;for my $cc(0..$#$kc+15){for m +y$kk(0.. $#{$kc->[$cc]}+18){$kc->[ $kk]->[$cc]=' 'i +f!defined $kc->[$kk]->[$cc];}}} my$qK=`clear`;my +$kc=0; while(1){print$qK;{ map{print jo +in('',@$_) ,"\n";}@{$qQq->[$kc ]}};++$q +;select undef ,undef,undef,0.2 ;++ +$kc;$kc=0 if ($kc+0+0+0+ + +0.0001 >$k);};; $_;

Note: it could sure be bettered in many ways; I will accept any suggestions, especially concerning a portable way to clear the screen.

Blop!

Replies are listed 'Best First'.
Re: The Perl Fan
by PsionicMan (Beadle) on Jul 21, 2001 at 19:15 UTC
    sorry, no helpful suggestions... I just wanted to say that that's pretty cool. I can almost feel the breeze..

    --Psi
    print(pack("h*","e4f64702566756e60236c6f637560247f602265696e676021602075627c602861636b65627e2")."\n");

Re: The Perl Fan
by converter (Priest) on Jul 22, 2001 at 21:13 UTC

    It's probably the fault of the rather lame X server for my Nvidia card, but all I see is chunks of text flashing all over the terminal. This might work a little better for folks with suboptimal video setups if it drew a smaller fan.

Error report
by Kickstart (Pilgrim) on Jul 26, 2001 at 00:02 UTC
    Missing $ on loop variable at ./fanfoo.pl line 32.

    Kickstart

      That's a version problem. It seems that v5.005 doesn't like things like for my$i (1..2) because there is no space between my and the loop variable ($i).

      v5.6.0 has no problem with it.

      Blop!