Creates 99 stars that orbit a black hole using Newtonian physics. Up and Down key change time while left and right key control zoom.
var d,n,x,y,v,A,C,H,N,P,S=T=1,W,O=window,M=Math,R=M.random
eval("O.onload=F(){P=[];for($=0;$<99;$++)m($,15+$*6,15*R(),M.round(999*R()));r(D=document);r(b);C=D.createElement('canvas');r(A=C.getContext('2d'));r(a);i();O.onresize=function(){N=1};O.onkeyup=function(e){e=e.keyCode;$=1.3;if(e==40)T/=$;if(e==38)T*=$;if(e==37)S/=$;if(e==39)S*=$;};setInterval(p,25)};m=F(j,d,r,k){v=M.sqrt(300/d)-.3*R();n=6.3*R();P[j]={x:d*M.cos(n),y:d*M.sin(n),c:k,r:r,v:v*M.sin(n),w:v*M.cos(n)}};i=F(){N=0;W=O.innerWidth-15;H=O.innerHeight-15;k(C);k(c)};r=F(t){for($ in t)t[$[0]+$.replace(/[a-z]/g,'')]=t[$]};k=F(e){e.width=W;e.height=H};p=F(){A.fillStyle='#000';A.fR($=0,0,W,H);for($ in P){with(A){n=P[$];x=n.x/S+W/2;y=n.y/S+H/2;bP();fillStyle=d='#'+n.c;strokeStyle=d;a(x,y,n.r/S*.8,0,6.3,1);fill();if(d=n.s/S)bP(),strokeStyle='#999',moveTo(x+d,y-d),lT(x-d,y+d),s()}};a.dI(C,0,0);for($ in P)n=P[$],x=n.x,y=n.y,d=x*x+y*y,d=T*300/d/M.sqrt(d),n.v-=d*x,n.w+=d*y,n.x+=n.v*T,n.y-=n.w*T;if(N)i()}".replace(/F\(/g,"function("))
dmFyIGQsbix4LHksdixBLEMsSCxOLFAsUz1UPTEsVyxPPXdpbmRvdyxNPU1hdGgsUj1NLnJhbmRvbQ0KZXZhbCgiTy5vbmxvYWQ9Rigpe1A9W107Zm9yKCQ9MDskPDk5OyQrKyltKCQsMTUrJCo2LDE1KlIoKSxNLnJvdW5kKDk5OSpSKCkpKTtyKEQ9ZG9jdW1lbnQpO3IoYik7Qz1ELmNyZWF0ZUVsZW1lbnQoJ2NhbnZhcycpO3IoQ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