Starburst by ltp

#!perl -nl
$i=$_;
@a=split//;

sub p{" "x$_[0]}
$d=-1;$t=1;
for(@a){
  $c+=$d;
  if($s==int(@a/2)){$o.="$i\n";$d=1;$t=-1;$s+=$t;next}
  $o.=p($s).$_.p(@a/2+$c).$_.p(@a/2+$c).$_.p($s)."\n";
  $s+=$t
}

print $o

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page