Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

A spinning JAPH

by Ido (Hermit)
on Jun 30, 2004 at 23:02 UTC ( [id://370935]=obfuscated: print w/replies, xml ) Need Help??

Not really obfuscated, but very ugly. I hope system('clear')&&system('cls') will work on most systems, but if not, please adjust..Also, please adjust $w and $h to your terminal's width and height. (I could do it on Win32, but how can it be done cross-platform?)
close STDERR; ($w,$h,$")=(80,25); @c='/GOoO#'=~/./g; ($t='X6X6X6X6X6X5XXXXXXXXX5XX5XX5XX5XX5XX5X1XXXXX1XXXXXX7X6X1XXXXX1X6X +7XXXXXXXXXXXXX3 X6X6X6X6X6X4XXXXX1X5XX5XXXXXXXXX5XX5XX5XX4XXX3X1XX3X1XX2X2XX2X2XX1 +X3XXX4X1XXXXX1 X5XX5XX5XX5XX5X1XXXXX1XXXXXXX3X6X6X6X6X6X3X5XX5XX5XXXXXXXXX5XX5XX5 +XXXXXXXX6X6XXX XXXXX6X6XXXXXXXX1XXXXXXX5XX5X1XXXXXX2X3X1X4XX5X1XXXXXXX5XX5X1XXXXX +X6X6X6XXXXXXXX 6X6XXXXXXXX6X6XXXXXXXX1XXXXXXX5XX5X1XXXXXX2X3X1X4XX5X6X6X6X6X6X6XX +XXXXXXX5XX5XX5 XXXXXXXXX5XX5XX5X1XXXXX1X5XX5XXXXXXXXX5XX5XX5XXXXXXX7X6X6X6X6XXXXX +XX1X5X2X3X3X2X 4X1X3X2X2X3XX5XXXXXXXX6X6XXXXXXXX6X6XXXXXXXX1XXXXXXX5XX5X1XXXXXX2X +3X1X4XX5X')=~s g\s+ggg;$t=~s/(\d)/' 'x$1/eg; sub t{my@h;$h[$$_[1]][$$_[0]+$w/2-6]=$$_[3]for sort{$a->[2]<=>$b->[2]} +@p;@h;sub p}s(()) (JsutAntoherPelrHcake);s qq@p=map{$y=$_;$t=~s/(.{7})//;map{$x=$_; map{[$x*2+1,$y*2+6,$_,$_+3],[$x*2,$y*2+6,$_,$_+3],[$x*2+1,$y*2+7,$_,$_ ++3],[$x*2,$y*2+7,$_,$_+3]}-2..2} grep $1=~/^.{$_}(?! )/,0..-1+$1=~y cccc}0..6; b(11/7);system('clear')&&system('cls'),p t,b(0.55/7)for 1..80qge; sub p{print map "@c[@{$_[$_]}[0..$w-2]]\n",0..$h-2,select$c=>$c=>$c=>0 +.01} sub b{@{$_}[0,2]=((cos($_[0])*($$_[0]-7)-sin($_[0])*($$_[2])+7),(sin($ +_[0])*($$_[0]-7)+cos($_[0])*($$_[2])))for@p}

Replies are listed 'Best First'.
Re: A spinning JAPH
by stvn (Monsignor) on Jul 01, 2004 at 17:02 UTC
    I hope system('clear')&&system('cls') will work on most systems, but if not, please adjust.

    You might try print "\ec" instead of system('clear')&&system('cls'), I think it should work on most terminals. Very cool.

    -stvn
      Thanks, but it doesn't work here, on Win...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://370935]
Approved by muba
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-25 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found