Details (Maple, Fortran and Scilab code) may be found in <SCIDIR>/demos/wheel2 directory.
path="SCI/demos/wheel2";
getf(path+'/show.sci');
//
if getenv('WIN32','NO')=='OK' & getenv('COMPILER','NO')=='VC++' then
cur_wd = getcwd();
chdir(SCI+"/demos/wheel2/Maple");
host("nmake /f Makefile.mak ");
chdir(cur_wd);
if ~c_link('wheel') then link('c:/tmp/wheel.dll ','wheel');end
else
host("cd $"+path+"; make ");
if ~c_link('wheel') then link('/tmp/wheel.o ','wheel');end
end
tmin=0.0;tmax=15;nn=300;
times=(0:(nn-1));
times=tmax*times/(nn-1) +tmin*((nn-1)*ones(times)-times);
// INITIAL CONDITIONS
x0=[0; //theta
%pi/2+0.1; //phi
0; //psi
5.0; //Dtheta
0.0; //Dphi
4.0; //Dpsi
0; //x
0]; //y
// SIMULATION
x=ode(x0,tmin,times,'wheel');
xselect();
show(x)
animation 66K