// This is just a graphic demo of the bike
// Copyright INRIA

mode(0);
xbasc();
fs = get('figure_style');

path=get_absolute_file_path('bike.dem');

getf(path+'macros/'+'velod.sci');
getf(path+'macros/'+'velodp.sci');
getf(path+'macros/'+'show.sci');

demolist=['bike : unstable trajectory';
          'bike : stable trajectory!'];
go_on=%t;

while go_on then
	
	num=tk_choose(demolist(:,1),'Choose a bike');
	
	if num==0 then
		go_on=%f;
		set('figure_style',fs);
	else
		select num
		case 1 then 
			getf(path+'macros/'+'velo4p.sci');
			//getf(path+'macros/'+'velo5.sci');
			x=read(path+'data/x1.dat',46,368,"(e10.4)");
			xbasc();
			set figure_style old;
			show(x(:,300:368),1,1,velo4p);
		case 2 then 
			getf(path+'macros/'+'velo1.sci');
			x=read(path+'data/'+'xdemo.dat',46,401,"(e10.4)");
			xbasc();
			set figure_style old;
			show(x(:,1:340),1.6,1.47,velo1);
		end
	end
end
