InitGraph(); b1x=.2; b1vx=0; b1y=-1; b2x=-.4; b2vx=0; b2y=-2; ScaleWindow(-3, -3, 3, 1); x0=500; y0=200; Move2D(pivot,0,0); running=true; //ctx.fillStyle="red"; setTimeout('RunModel();',20); ctx.strokeStyle="white"; ctx.lineWidth=5; ctx.beginPath(); //rub out old lines LineStart(0,0); LineTo(b1x,b1y); LineTo(b2x,b2y); ctx.stroke(); b1vx+=(b2x-3*b1x)*g*dt; b2vx+=(b1x-b2x)*g*dt; b1x+=b1vx*dt; b2x+=b2vx*dt; b1y=-1+b1x*b1x/2; b2y=b1y-1+b2x*b2x/2; Move2D(b1,b1x,b1y); Move2D(b2,b2x,b2y); ctx.strokeStyle="red"; ctx.lineWidth=1; ctx.beginPath(); LineStart(0,0); LineTo(b1x,b1y); LineTo(b2x,b2y); ctx.stroke(); //document.trace.test.value=load.style.left; canvas.ZOrder=3; //Move2D(load,0,0); if(running){setTimeout('RunModel();',10);}