Graphical computer fun

Here’s something fun to do:

STEP 1. Go to a page that has a lot of pictures. For example Google images and do a search or something.

STEP 2. While still on the page, delete the URL in the address bar and replace it with this entire code:

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval(‘A()’,5); void(0);

Update:  Go here and copy the code.  Doesn’t seem to work with the code above.

STEP 3. Press ENTER

Cool huh?

via

15 thoughts on “Graphical computer fun”

  1. Hello,

    The code is wrong use this one and follow the same instructions is really cool!
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI= document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval(‘A()’,5 ); void(0)

    Reply
  2. Wasn’t working for me at first either and neither was the one Jaime posted. Friend of mine who does programming and knows Java looked at it and gave me this:

    javascript:R=0;S=0;T=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24;x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length;function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style;DIS.position=’absolute’; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5+Math.random()*10;DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5+Math.random()*10}T+=0.02;S=Math.sin(T);R+=S }setInterval(‘A()’,5); void(0)

    That made it work and it was very cool. Thing to note is I don’t think it works for FireFox.

    Reply
  3. It’s Java*Script* not Java. I was interested in reducing the speed to I took a look at the code and adjusted the last number upward. So if you change “…(’A()’,5)…” to “…(’A()’,25)…” it’ll move slower and looks a lot cooler IMO.

    Reply

Leave a Comment