"; astr +="
"; mondoc.write(astr); mondoc.close(); } function mvtqqn(){ nbessais =0; trajr="0"; if (document.choixmvt.typemvt[0].checked) { ax=0; vx= Math.floor(Math.random()*30)/5; dx=0; mobilex=vx.toPrecision(2)+"*t"; document.equation.x.value="0 + 0 * t"; typemvt="MRU"; } if (document.choixmvt.typemvt[1].checked) { ax= Math.floor(Math.random()*10)/2; vx= Math.floor(Math.random()*30)/5; dx=0; mobilex=vx.toPrecision(2)+"*t+"+ax.toPrecision(2)+"*t*t"; document.equation.x.value="0 * t + 0 *t*t"; typemvt="MRUA"; } if (document.choixmvt.typemvt[2].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.toPrecision(2)+"+"+vx.toPrecision(2)+"*t+"+ax.toPrecision(2)+"*t*t"; document.equation.x.value="0 + 0 * t + 0 *t*t"; typemvt="MRUA avec vitesse initiale"; } } function initialisation() { document.Animator.setAutoRefresh(false); 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); mvtqqn(); demo(); } function nouvelleTrajectoire() { document.Animator.setAutoRefresh(false); document.Animator.reset(); document.equation.x.value=""; mvtqqn(); demo(); } function nouvelEssai() { document.Animator.setAutoRefresh(false); document.Animator.reset(); trajr=document.equation.x.value; nbessais=nbessais+1; demo(); } function demo(){ document.Animator.setTrajectory(id,mobilex,"0"); document.Animator.setTrajectory(id2,trajr,"0"); document.Animator.setAutoRefresh(true); document.Animator.forward(); } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //-->
Donner l'équation du mouvement de la bille rouge, c'est à dire sa position x en fonction du temps, pour qu'elle suive le mouvement de la bille noire.