simple octagon tesselation by pascal

i,j,k,s;main(N){for(k=N=getchar()%6*9-5;k--;puts(""))for(i=k>N/2?N-1-k:k,s=N/3-i/3*3-1,s*=s>0,j=0;j<N-s-!(i%3);j++)putchar(j<s?32:(i*i%3^j*j%3)*3+32);}

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

download

return to the top page