Sierpinski Fractal by GreyKnight

W=io.write I=2^io.read"*n"-1 for r=0,I do W((" "):rep(I-r))for c=0,r do k=c for i=0,r do Z=r/2^i%2<1 and k%2>0 if Z then W"  "break end k=math.floor(k/2)end Z=Z or r%2==0 and c%2==0 and W"/\\"or c%2==0 and W"/_"or W"_\\"end W"\n"end

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

download

return to the top page