"; astr +="
"; mondoc.write(astr); mondoc.close(); } function mvtqqn() { nbessais =0; trajx="0"; trajy="0"; document.equation.trajx.value=""; document.equation.trajy.value=""; if (document.choixmvt.typemvt[0].checked) { ax=0; ay=0; vx= Math.floor(Math.random()*30)/5; vy= Math.floor(Math.random()*20)/5; dy=0; dx=0; mobilex=vx+"*t"; mobiley=vy+"*t"; typemvt="Mouvement sans accélération"; } if (document.choixmvt.typemvt[1].checked) { ax= 0; vx= Math.floor(Math.random()*30)/5; dx=0; mobilex=vx+"*t+"+ax+"*t*t"; ay= Math.floor(Math.random()*10)/2; vy= Math.floor(Math.random()*30)/5; dy=0; mobiley=vy+"*t+"+ay+"*t*t"; typemvt="Avec accélération sur un des axes"; } if (document.choixmvt.typemvt[2].checked) { ax= Math.floor(Math.random()*10)/2; vx= Math.floor(Math.random()*30)/5; dx=0; mobilex=dx+"+"+vx+"*t+"+ax+"*t*t"; ay= Math.floor(Math.random()*10)/2; vy= Math.floor(Math.random()*30)/5; dy= 0; mobiley=dy+"+"+vy+"*t+"+ay+"*t*t"; typemvt ="avec accélérations"; } if (document.choixmvt.typemvt[3].checked) { ax= 5-Math.floor(Math.random()*10)/2; vx= 5-Math.floor(Math.random()*30)/5; dx=5-Math.floor(Math.random()*30)/5;; mobilex=dx+"+"+vx+"*t+"+ax+"*t*t"; ay= 5-Math.floor(Math.random()*10)/2; vy= 5-Math.floor(Math.random()*30)/5; dy=5-Math.floor(Math.random()*30)/5;; mobiley=dy+"+"+vy+"*t+"+ay+"*t*t"; typemvt="Mouvements avec conditions initiales"; } } function initmvt() { document.Animator.reset(); mvtqqn(); demo(); document.Animator.forward(); } function initialisation() { document.Animator.reset(); document.Animator.setDefault(); document.Animator.setTimeInterval(0,10); document.Animator.setPixPerUnit(50); document.Animator.setGridUnit(1); document.Animator.shiftPixOrigin(-200,-50); id=document.Animator.addObject("circle","r=10"); id2=document.Animator.addObject("circle","r=6"); document.Animator.setRGB(id2,255,0,0); initmvt(); } function nouvelleTrajectoire() { trajx=document.equation.trajx.value; trajy=document.equation.trajy.value; if(trajx=="") { trajx="0"}; if(trajy=="") { trajy="0"}; nbessais = nbessais +1; demo(); document.Animator.forward(); } function demo(){ document.Animator.setAutoRefresh(false); document.Animator.reset(); document.Animator.setTrajectory(id,mobilex,mobiley); document.Animator.setTrail(id,300); document.Animator.setTrajectory(id2,trajx,trajy); document.Animator.setTrail(id2,300); document.Animator.setAutoRefresh(true); } function MM_openBrWindow(theURL,winName,features) { //v2.0 document.Animator.pause(); window.open(theURL,winName,features); document.Animator.forward(); } //-->