"; astr +="
"; mondoc.write(astr); mondoc.close(); } function mvtqqn() { trajx="0"; trajy="0"; document.equation.trajx.value=""; document.equation.trajy.value=""; if (document.choixmvt.typemvt[0].checked) { omegax= Math.floor(Math.random()*30)/5+1; ampx= Math.floor(Math.random()*20)/5+1; mobilex=ampx+"*sin("+omegax+"*t)"; mobiley="0"; typemvt="Mouvement à une dimension"; } if (document.choixmvt.typemvt[1].checked) { omegax= Math.floor(Math.random()*30)/5+1; ampx= Math.floor(Math.random()*20)/5+1; omegay= Math.floor(Math.random()*30)/5+1; ampy= Math.floor(Math.random()*20)/5+1; mobilex=ampx+"*sin("+omegax+"*t)"; mobiley=ampy+"*sin("+omegay+"*t)"; typemvt="Mouvement à deux dimensions"; } if (document.choixmvt.typemvt[2].checked) { omegay= Math.floor(Math.random()*30)/5+1; ampy= Math.floor(Math.random()*20)/5+1; ampx= Math.floor(Math.random()*10)/5+1; mobiley=ampy+"*sin("+omegay+"*t)"; mobilex="-4 +"+ampx+"*t"; typemvt="Mouvement périodique sur un axe seulement"; } } 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" }; 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(); } //-->