Topic awaiting preservation: Silencing is a new illusion that shows (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: The Land of one Headlight on. |
posted 01-08-2011 15:52
I'll stare at anything. =) |
Maniac (V) Mad Scientist From: |
posted 01-08-2011 23:21
Back in my ninja days, learned a few things about perception. |
Nervous Wreck (II) Inmate From: Portland Oregon |
posted 01-09-2011 07:12
pretty cool. I made a script to test different speeds. code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title></title> </head> <body> <canvas id='canvas' style="border: solid 1px;" ></canvas> <script type='text/javascript'> /* inspired by http://visionlab.harvard.edu/silencing/ */ var point=function(x,y){ this.x=x; this.y=y; this.color="red"; } point.prototype={ c:function(i){ this.color=this.colors[i] }, colors:["red","orange","yellow","green","blue","indigo","violet","pink"] } points=[] for(i=0;i<100;i++){ var z=(Math.random()*2)%2==0?1:-1; var item=new point( Math.random()*200*(Math.cos(i/100*2*Math.PI))*z , Math.random()*200*(Math.sin(i/100*2*Math.PI))*z ) points.push(item) } window.onload=function(){ var canvas = document.getElementById('canvas'); var ctx=canvas.getContext('2d'); canvas.width=canvas.height=600 var rotate=0 var colorchange=0 var spinning=false function render(){ colorchange++; canvas.width=canvas.width ctx.translate(300,300) if(spinning){ rotate+=.05 rotate%=6.28 ctx.rotate(rotate) } points.map(function(i){ if(colorchange%5==0){i.c(~~(Math.random()*8))} ctx.beginPath() ctx.fillStyle=i.color ctx.arc(i.x,i.y,5,0,6.28,false) ctx.fill() }) } setInterval(render,10) setInterval(function(){spinning=spinning?false:true},5000) } </script> </body> </html> |
Lunatic (VI) Mad Scientist From: The Happy Hunting Grounds... |
posted 01-11-2011 14:31
I love stuff like this! Thanks for posting! |