#!/usr/bin/perl $d=`date +%l:%M`;chomp($d);($h,$m)= split(/:/,$d); $h=0 if $h==12;$h=($h*30)+180; $h-= 360 if $h>360;$m = ($m*6)+180;$m-=360 if $m>360;@o =([' ', ' ',' ', ' ',' ' ,' ',' ' , ' ' , ' ',' ', ' ',' ' ,' ' ,' ','|' ],[' ', ' ', ' ',' ', ' ',' ' ,' ' ,' ',' ' , ' ' , ' ', ' ',' ', ' ','|' ], [ ' ',' ', ' ',' ' ,' ' ,' ',' ' , ' ' , ' ', ' ',' ', ' ',' ' ,' ' ,'|'] ,[ ' ',' ' ,' ', ' ',' ', ' ',' ' ,' ' ,' ',' ' , ' ' , ' ', ' ',' ', '|'] ,[ ' ', ' ',' ', ' ',' ' ,' ' ,' ',' ' , ' ' , ' ', ' ',' ', ' ',' ' ,'|' ], [' ', ' ',' ' ,' ' ,' ',' ' , ' ' , ' ', ' ',' ', ' ',' ' ,' ',' ' ,'|'],[ ' ',' ', ' ',' ' ,' ',' ' ,' ',' ' ,' ',' ' ,' ',' ',' ',' ','|'],[' ',' ',' ',' ',' ',' ',' ' ,' ',' ',' ',' ',' ',' ',' ','|'],[' ',' ',' ',' ' ,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|'],[' ' ,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' , ' ','|'],[' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ','|'],[' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ','|'],[' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|'],[' ', ' ',' ',' ',' ',' ',' ',' ',' ', ' ', ' ',' ',' ', ' ','|'],[' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ','|'],[' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ','|'],[' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|']); sub dl {$l=$_[2]; while($l-- > 1){$o[int($_[0]+($l*cos ($_[3])))][int($_[1]+($l*sin($_[3])))]=$_[4];}}sub cc {@c=('|','/','-','\\','|','/','-','\\'); return $c[int((abs($_[0])+22.5)/45)];}dl(7,7,5,-(($h/180) *3.1415),&cc(-$h));dl(7,7,7,-(($m/180)*3.1415),&cc (-$m));sub pm {print "-"x29,"\n"; for($z=0;$z<$#o; $z++){print "@{$o[$z]}\n";}print "="x29,"\n";}± print " ---> $d <--- \n"; # Analog Obfuscated Clock # by Gilberto "Velenux" Ficara, March 2004 # # Thanks to Cyberbrown, Javanx, lu_zero, gmax # and noteof for useful hints, algorithms and # supplying to me the mathematics I lack
In reply to What time is it? by Velenux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |