InitGraph(); window.place=function(a,x,y,angle){ ctx.setTransform(1,0,0,1,0,0); ctx.translate(x,y); ctx.rotate(angle); ctx.translate(-x,-y); ctx.drawImage(a,x-a.width/2,y-a.height/2); } window.p1 = new Image(); window.p2=new Image(); p1.src = "front-view.jpg"; window.p2 = new Image(); p2.src = "plane-azimuth.jpg"; //alert("init"); //ScaleWindow(0, 0,cols, rows) running=true; ctx.fillStyle="red"; setTimeout('RunModel();',20); //ctx.clearRect(160,120,p1.width,p1.height); rollrate+=ux*dt; rollrate=Math.min(ratelim, Math.max(-ratelim,rollrate)); roll+=rollrate*dt; document.trace.test.value=track; place(p1,600+track,160,roll); az+=roll*dt/4; track+=100*az*dt; place(p2,600+track,360,-az); if(running){setTimeout('RunModel();',10);}