Inspired by liverpole's recent foray into pseudoscience (or possibly protoscience, depending on your opinion) with his recent Cyclical Japh, I thought I'd make a bit of a foray of my own into the arcane arts myself.
For anyone who likes to pay attention to such things for planning their day, I present my homage to the Moon (pictured here so you don't have to squint too hard).
#!/usr/bin/perl
$_=q|$B="\e[1m\@\e[2
2m";sub'g{($cx,$cy,$r,$a,$b)=@_;
my@o;F($t=0;$t<3.14159;$t+=.04/$r){$x=
$cx+int($r*cos$t);$Y=$cy+int(($r*11/5*sin $t)
/ $a**3);$o[ $x][$Y]=$B;$Y=$cy-int(($r *11/
5 * si n$t )/$b** 3);$o[$x][$
Y ]=$B}@o}$ H='rel w-w-w-o -o -o-h';
s ub'p{ R" \ e[40m ;\e [37m\e [ 2J\e[1;
+1
f \n"; i f($_[0 ]== -1&&$_[ 1 ]==1){
+ret
u rn}@ o=g (10,2 1 ,1 0 ,@ _
+);my
$ l; F ^my$i (@ o){$t=0;F(@ $
+i){if
( $_ ){R $_;$t=($t&&${l
+}ne$_)
?0 :1 ;$ l= $_}else{R$t?'#'
+:'^'}}R
"\ e[2 m\n"} w()if($_[0]= =1&&$
+_[1]==1
)} sub'h { $ z=4;R"\e[4 7m\e[30m\e[9;${ z
+ }f\n ";
F( spl it(//,~~ re verse" ^,$H ^lreP^rehton
+ a^ts u
J^ ")) {R"\e[9;${z}f$ _\n";S.0 3;$z++}R"\e[
+ 0m\e [
23 ;0f \n";S.9}F($b= -1;$b>-3 .2; $b-= .1){p(1,
+$b);S. 0
6/ $b** 2}F($b=3.2;$b >.9;$ b- = .1){p ( 1, $b);S.06/ $
+b* *2}F
($ a=1;$ a<3.2;$a+=.1) {p $a ,1; S. 06/$a**2
+} F( $
a= -3.2;$a<-.9;$a+=.1){ p$a,1; S.06/$a * *2}R"\e[2m
+;\ e[2 J
\e[ 0;0f\n";S.3;su b'z {my($y,$m,$d)=@_; if( $m<3
+) {$y -
-;$ m+=12}my$ j=( 365.25*$y+30.6*$ m+ $d
+-69403 9
.09) /29. 53; $b =int$j;$j-=$ b;$b=in
+t($j*31+
.5) }( $d , $m,$y)=(localtime)[3,4,5];$m++; $y+=1900; @p
+=([-1,1
],[-1, 1], [1,-1 .05],[1,-1.1],[1,-1.2],[ 1,-1.3],[1, -1.
+5],[1,-
2],[1,-3. 2],[ 1,1.8],[1,1.5],[1,1.35], [1,1.2],[1, 1.1],
+[1,1.0
5],[1,1], [1. 05, 1],[1.1,1],[1.15,1],[1.2,1], [1.25,1], [1.
+5,1],
[1.8, 1 ],[2. 2,1],[-3.2,1],[-2.2,1],[ -1.8, 1],[
+-1.5
,1],[ -1.35,1 ],[-1.2,1],[-1.1,1],[-1,1] ); sub'w{my@o=(
+'^^
^\|\\^ ^^^^^^','^^ \|V.\\_^^^^^^','^^\|..\'.\\^^^^^','^^)...,_
+\\
^^^^','^/....\|^^^^^^','/......\\^^^^^','\|.......\\^^^^','^\\.
+.
.....\\^^^','^^\|.......\\^^','^^\|.\|......\|^','__/.\|\\..
.../');F^my$o(12..22){F(18..30){my$l=substr($o[$o-12],$_
-18,1);R${l}ne'^'?"\e[31m\e[$o;${_}H$l\e[39m\n":''}}
h()}|;s*\s+**gx;s-\^- -gx;s^R^print^g;s!F!for!g;
eval ;sub'S{my$s;select$s,$s,$s,$_[0]} p(@
{ $p[z($y,$m,$d)]}); print"\e[0m\e[2".
"3;0f\nphase for $m/$d/$y\n"
Update: Thanks for the pointer(s), ikegami. I tend to forget to make sure things like this work on Windows without alteration.
--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; =
qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)