getf('book_play.sci') /// @@prerequisite getf('profile.sci') /// @@prerequisite getf('model.sci') /// @@prerequisite getf('simul_car.sci') /// @@prerequisite A=30;a=5.2;f=%pi/A;B=3;b=1;/// \sleftarrow{\normalfont curve parameters} XI=A; /// \sleftarrow{\normalfont used to define boundaries of display} del=.02;TT=[del:del:15];/// \sleftarrow{\normalfont instances {for} animation} // model parameters l=6;l2=l/2;m=1;d=4;g=10;gam=.5; J=m*l2*l2/4;k=12;r2=d/4; // compute reasonable initial state x=-XI+.7; y=d-m*g/2/k+F(x);xsi=y-F(x-l2)-.3;eta=y-F(x+l2)-.4; X=[x;0;y;0;0;0;xsi;eta]; ST1=1;ST0=1; [XX,T]=simul_car(TT,X); /// \sleftarrow{\normalfont simulation} play(T,X,XI) /// \sleftarrow{\normalfont animation}