RAYTRACED CHECKBOARD

101 wordsMathieu 'p01' Henri on April 20th, 2012

Raytraced Checkboard

What about an Ascii art raytraced checkboard animation in 128 bytes of HTML + JavaScript ?

It's been a little while since I did a simple raytraced checkboard and thought it was a nice candidate for 128 bytes release. Here's the whole source code:

<pre id=p><script>n=setInterval("for(n+=7,i=k,P='p.\\n';i-=1/k;P+=P[i%2?(i%2*j-j+n/k^j)&1:2])j=k/i;p.innerHTML=P",k=64)</script>

The effect in itself is not that interesting but it was fun to squeeze in 128 bytes and explore this size limit some more.

Hope you appreciate this little prod. Make sure to leave comments, piggies and thumbs up or down for 128b Raytraced Checkboard on Pouet.net.