# Geometriesyr16 - Exemple 6

exemple.mp [ source brut ]

``` input geometriesyr16;
typerepre:="persp";

```
``` figureespace(-5u,-5u,5u,5u);
Initialisation(10,0,10,35);
trace cercles((0,0,0),(0,0,2),(0,0,0),(0,1,0),(0,0,1));
path CL;
color M,M';
color Cent;
M=(0,2*cosd(-130),2*sind(-130));
Cent=ProjectionsurPlan(M,(0,0,0),(0,2*cosd(120),2*sind(120)),(1,0,0));
M'=(-1,greenpart(Cent),bluepart(Cent));
path Sect;
Sect=cercles(Cent,M,Cent,M,M');
remplis Sect withcolor 1.1*gris;
trace subpath(0,length Sect/2) of Sect dashed evenly;
trace subpath(length Sect/2,length Sect) of Sect;
CL=cercles((0,0,0),(0,2,0),(0,0,0),(0,1,0),(1,0,0));
trace subpath(0,length CL/2) of CL;
trace subpath(length CL/2,length CL) of CL dashed evenly;
trace polygone(Cent,M,(0,0,0)) dashed evenly;
trace codeperp((0,0,0),Cent,M,5);
marque_p:="plein";
pointe(M,(0,0,0),Cent);
marque_p:="non";
label.top(btex \$O\$ etex,Projette((0,0,0)));
label.bot(btex \$I\$ etex,Projette(Cent));
label.llft(btex \$M\$ etex,Projette(M));
finespace;

```
``` figureespace(-5u,-5u,5u,5u);
Initialisation(10,0,10,35);
color M,M',Cent;
path CL,CF,Sect,plansec;
CL=cercles((0,0,0),(0,2,0),(0,0,0),(0,1,0),(1,0,0));
CF=cercles((0,0,0),(0,0,2),(0,0,0),(0,1,0),(0,0,1));
M=(0,2*cosd(-130),2*sind(-130));
Cent=ProjectionsurPlan(M,(0,0,0),(0,2*cosd(120),2*sind(120)),(1,0,0));
M'=(-1,greenpart(Cent),bluepart(Cent));
Sect=cercles(Cent,M,Cent,M,M');
plansec=polygone(M'+2*(M'-Cent)+1.5*(M-Cent),M+3*(Cent-M')+0.5*(M-Cent),
Cent+1.5*(Cent-M)+3*(Cent-M'),M'+2*(M'-Cent)+1.5*(Cent-M));
%partie supérieure
trace plansec cutafter CF;
trace segment(M'+2*(M'-Cent)+1.5*(M-Cent),M'+2*(M'-Cent)+1.5*(Cent-M)) cutafter reverse(CF);
trace plansec cutbefore CF dashed evenly;
trace CF cutbefore demidroite(Cent,symetrie(M,Cent)) cutafter segment(M,M);
remplis Sect withcolor 1.1*gris;
trace subpath(0,length Sect/2) of Sect dashed evenly;
trace subpath(length Sect/2,length Sect) of Sect;
trace polygone(Cent,M,(0,0,0)) dashed evenly;
trace codeperp((0,0,0),Cent,M,5);
marque_p:="plein";
pointe(M,(0,0,0),Cent,M');
marque_p:="non";
label.top(btex \$O\$ etex,Projette((0,0,0)));
label.bot(btex \$I\$ etex,Projette(Cent));
label.llft(btex \$M\$ etex,Projette(M));
%partie inférieure
picture sectiondecalee;
sectiondecalee=image(
trace CF cutafter demidroite(Cent,symetrie(M,Cent));
trace CF cutbefore segment(M,M);
trace Sect;
trace hachurage(Sect,60,0.2,0);
);
trace sectiondecalee shifted(3*(Projette(Cent)-Projette((0,0,0))));
drawarrow segment(M+2*Cent,Cent+3*Cent);
label.lft(btex Section etex,Projette(M+2*Cent));
finespace;

end```