Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script>
- var t=[];
- var u=[-10.0,10.0,10.0,10.0,10.0,10.0,10.0,-10.0,10.0,-10.0,-10.0,10.0,-10.0,10.0,-10.0,10.0,10.0,-10.0,10.0,-10.0,-10.0,-10.0,-10.0,-10.0];
- function s(x,y,z){t[y*32+x].checked=z;}
- function cosDeg(b){return Math.cos(b*3.141592/180);}
- function sinDeg(b){return Math.sin(b*3.141592/180);}
- function a() {
- theta++;
- for(var i=0;i<512;i++)t[i].checked=false;
- for(var i=0;i<8;i++){
- var x=u[i*3]*cosDeg(theta)+u[i*3+2]*sinDeg(theta);
- var y=u[i*3]*(1-cosDeg(theta*2))/2+u[i*3+1]*cosDeg(theta)+u[i*3+2]*-sinDeg(theta*2)/2;
- var z=u[i*3]*-sinDeg(theta*2)/2+u[i*3+1]*sinDeg(theta)+u[i*3+2]*(1+cosDeg(theta*2))/2+150;
- s(Math.floor(x*64/z)+16,Math.floor(y*64/z)+8,true);
- }
- setTimeout(a,10);
- }
- </script>
- </head>
- <body onload="a()">
- <div id="f" />
- <script>
- var theta=0;
- for(var j=0;j<16;j++){
- for(var i=0;i<32;i++)
- f.innerHTML+="<input type='checkbox' id='c"+(j*32+i)+"' />";
- f.innerHTML+="<br />";
- }
- for(i=0;i<512;i++)
- t[i]=document.getElementById("c"+i);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement