function play(T,X,XI) D=[600,200]; dr=driver(); driver('Pos'); set_posfig_dim(D(1),D(2)); xinit('carsim') clf() h=gcf(); // h.figure_size = [1000 100]; h.children.axes_visible=['off','off','off'] ; h.children.isoview='on'; h.children.tight_limits = "on" h.children.margins = [0,0,0,0]; XXX=[-XI-l2:0.1:3*XI+l2]; FY=[];XC=[]; for x=XXX, th=atan(Fx(x)); XC=[XC,x+sin(th)*r2] FY=[FY,F(x)-cos(th)*r2]; end h.children.data_bounds=[min(XC),min(FY)-10*d;max(XC),max(FY)+d]; xfpoly([XC(1),XC,XC($)],[min(FY)-d,FY,min(FY)-d]); hfp = gce(); hfp.foreground = 5; l3=1.15*l2; for i=[15,30,35, 42,45,49,52,58,64]*10 X=XX(:,i); x=X(1);xd=X(2);y=X(3);yd=X(4);th=X(5);thd=X(6);xsi=X(7);eta=X(8); x0=x+xsi*sin(th)-l2*cos(th); x1=x+eta*sin(th)+l2*cos(th); y0=y-xsi*cos(th)-l2*sin(th); y1=y-eta*cos(th)+l2*sin(th); xp=[x0,x-l2*cos(th);x+l2*cos(th),x1]'; yp=[y0,y-l2*sin(th);y+l2*sin(th),y1]'; xpp=[x-l3*cos(th);x+l3*cos(th)]; ypp=[y-l3*sin(th);y+l3*sin(th)]; W1=[x0-r2,y0+r2,2*r2,2*r2,0,360*64]; W2=[x1-r2,y1+r2,2*r2,2*r2,0,360*64]; if i==1 then xpoly(xpp,ypp); hp1 = gce(); hp1.thickness=10; hp1.foreground=9 xpolys(xp,yp); xfarcs([W1',W2']); else xpoly(xpp,ypp); hp1 = gce(); hp1.thickness=10; hp1.foreground=9 xpolys(xp,yp); xfarcs([W1',W2']); end end set_posfig_dim(0,0); xend(); driver(dr); unix(SCI+'/bin/BEpsf carsim '); endfunction