1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
function affichageMoment(selectedStep,tulipe,jonc,Nhis,Mfis)
DT=tulipe.diametreFondGorge+jonc.hauteurFil;
xMax=max(Nhis(:,1,:));
yMax=max(Nhis(:,2,:));
yMin=max(Nhis(:,2,:));
etendu=abs(max(Mfis))+abs(min(Mfis));
graphNumber=200+selectedStep
nn=10
nInf=zeros(nn,1)
nSup=zeros(nn,1)
temp997=size(Effch);
n=temp997(1,3);
nInf(1,1)=min(Mfis);
for pp=2:nn
nInf(pp,1)=min(Mfis)+(((pp-1)/nn)*etendu);
end
nSup(nn,1)=max(Mfis);
for pp=1:nn-1
nSup(pp,1)=min(Mfis)+((pp/nn)*etendu);
end
scf(graphNumber);
for pp=1:nn
plot(-10,0,'color',couleur(nn-pp+1,nn));
str(pp,1)=msprintf("%d < X < %d",nInf(pp,1),nSup(pp,1));
end
legend(str(1,1),str(2,1),str(3,1),str(4,1),str(5,1),str(6,1),str(7,1),str(8,1),str(9,1),str(10,1),"out_upper_right")
th=gce()
th.font_size=2
a=gca();
a.isoview='on';
a.data_bounds=[0,yMin;xMax,yMax];
a.title.text="Circlip Simulation";
a.title.font_size=5;
f=gcf();
f.figure_size=[700,1000];
alpha=-%pi/2:0.01:%pi/2;
plot((DT/2)*cos(alpha),(DT/2)*sin(alpha),'k');
xstring(12,-12,string(selectedStep),0,1);
for ii=1:99
pt=[Nhis(ii,1,selectedStep) Nhis(ii,2,selectedStep);...
Nhis(ii+1,1,selectedStep) Nhis(ii+1,2,selectedStep)];
for uu=1:nn
if Mfis(ii,selectedStep)>=nInf(uu,1)&Mfis(ii,selectedStep)<nSup(uu,1) then
ptColor=couleur(uu,nn);
end
end
plot(pt(:,1),pt(:,2),'color',ptColor);
e=gce();
e.children.thickness=2;
end
endfunction |
Partager