2
// Version roues a rayons ( qui tournent avec la roue !)
3
// la formule donnant l'angle de rotation est sans doute fausse
4
// j'ai suppose que la roue tournait avec la
5
// vitesse angulaire xx(6,i) pour la roue rear
6
// et que le temps d'integration etait de 1
7
// => theta (i) = xx(6,i)*i/imax
9
ct=-cos(t);cp=cos(p);st=-sin(t);sp=sin(p);
10
xe=[xmin,xmax,xmax,xmin,xmin]
11
ye=[ymin,ymin,ymax,ymax,ymin]
12
box=[ xe,xe; ye,ye ; zmin*ones(1,5),zmax*ones(1,5)];
13
all=[ct -st 0; cp*st cp*ct sp]*box
15
xmax=maxi(all(1,:));xmin=mini(all(1,:));
16
ymax=maxi(all(2,:));ymin=mini(all(2,:));
22
isoview(xb(1),xb(2),yb(1),yb(2))
23
plot2d(all(1,1:5)',all(2,1:5)',[1,-1],"000")
26
//plot2d((ct*xprear(1,:)-st*xprear(2,:))',...
27
// (cp*(st*xprear(1,:)+ct*xprear(2,:))+sp*xprear(3,:))',...
30
//plot2d((ct*xpfront(1,:)-st*xpfront(2,:))',...
31
// (cp*(st*xpfront(1,:)+ct*xpfront(2,:))+sp*xpfront(3,:))',...
34
[n1,n2]=size(xfrontar);
36
if ~isdef('velo_rti') then velo_rti=0.03;end
37
realtimeinit(velo_rti);
39
for i=1:n2-1,velod(i);realtime(i);velod(i);
41
plot2d((ct*xprear(1,ww)-st*xprear(2,ww))',...
42
(cp*(st*xprear(1,ww)+ct*xprear(2,ww))+sp*xprear(3,ww))',...
44
plot2d((ct*xpfront(1,ww)-st*xpfront(2,ww))',...
45
(cp*(st*xpfront(1,ww)+ct*xpfront(2,ww))+sp*xpfront(3,ww))',...
49
xset("alufunction",3);