Sierpinski Carpet by primo

<?for(;$n>$e*=3or$e=($i+=$e&&print$s.~\xf5)<$n|=pow(3,fgets(STDIN))+$s=~\xc5\xc5;)$s.=str_pad($i/$e%3&1?'':$s,$e*2).$s;

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

download

return to the top page