Simple, quick and dirty "two 3D advancing planes" raytraced with a 4x4 grid. The depth is taken into account.
M=Math;pi=parseInt;c=document.getElementById("c");T=c.getContext("2d");W=256;w=512,w2=w/2;c.height=W;c.width=w;h=W,h2=h/2;im=T.getImageData(0,0,w,h);D=im.data;G=4;P=255;Number.prototype.m=function(a){return((this%a)+a)%a};function no(f,e,g){n=M.sqrt(f*f+e*e+g*g);return[f/n,e/n,g/n]}function fi(a){A=a[1];return A!=0?50/A:0}co=[0,0,-100];function fin(a,b){r=[];vg=a[0],vd=a[1];dvg=(a[2]-vg)/b,dvd=(a[3]-vd)/b;cv=0;k=b;l=b;while(k--){dx=(vd-vg)/b;cv=vg;while(l--){r.push(cv);cv+=dx}l=b;vg+=dvg;vd+=dvd}return r}z=0;setInterval(function(){for(y=0;y<h2;y+=G){for(x=-w2;x<w2;x+=G){xp=x+w2;yp=y+h2;function a(b,e){d=no(b,e,-co[2]);i=fi(d);return(i>0)?(pi(i*d[0]).m(W)^pi(i*d[2]+co[2]+z).m(W))*M.exp(-i/150):0}A=fin([a(x,y),a(x+G,y),a(x,y+G),a(x+G,y+G)],G);i=0;for(yd=yp;yd<(yp+G);yd++){for(xd=xp;xd<(xp+G);xd++){I=(yd*w+xd)*4;D[I+0]=D[I+1]=D[I+2]=A[i++];D[I+3]=P}}}}for(y=-h2;y<0;y++){for(x=-w2;x<w2;x++){xp=x+w2;yp=y+h2;I=(yp*w+xp)*4;D[I+2]=D[((h-yp-1)*w+(w-xp-1))*4+2];D[I+3]=P}}im.data=D;T.putImageData(im,0,0);z+=10},30);
TT1NYXRoO3BpPXBhcnNlSW50O2M9ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImMiKTtUPWMuZ2V0Q29udGV4dCgiMmQiKTtXPTI1Njt3PTUxMix3Mj13LzI7Yy5oZWlnaHQ9VztjLndpZHRoPXc7aD1XLGgyPWgvMjtpbT1ULmdldEltYWdlRGF0YSgwLDAsdyxoKTtEPWltLmRhdGE7Rz00O1A9Mj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