simple octagon tesselation by nn

n=System.in.read()%8*3-2
0.upto(3*n){int p=[n-it+1,it+1-2*n,0].max()/3
q=n-2*p
println'   '*p+(it%3?'#  '*q+'#':' ##'*q)}

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

download

return to the top page