Section d’un cône de révolution

cone

input geometriesyr16;
input dlf_tex.mp;

u:=1cm;

%----------------------------------- Définition du cadre
path cadre;
numeric xmin,xmax,ymin,ymax;
xmin:=-6u;
xmax:=14u;
ymin:=-3u;
ymax:=8u;

cadre:=(xmin,ymin)--(xmax,ymin)--(xmax,ymax)--(xmin,ymax)--cycle;


%---------------------------------- Définitions générales utilisées
%                                   sur toutes les figures


numeric rb,h;
rb:=3;     % rayon de base
h:=6;      % hauteur

pair A,B,O,S,T;
A=(-rb*u,0);
O=(0,0);
B=(rb*u,0);
S=(0,h*u);
T:=(0,-1.5*u);

pair W,V;
W:=(8u,2.5u);
V:=(8u,0);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i:=0 upto 10:
beginfig(i+1)


path cc;
cc= cercles(O,rb*u);
cc := cc yscaled 0.2;
draw subpath (0, length cc /2) of cc dashed evenly;
draw subpath (length cc /2,length cc) of cc;

draw A--S--B;

draw S--O dashed evenly;


numeric cr;
cr:=0.1*i;

cc:= cercles(O,cr*rb*u);
cc:= cc yscaled 0.2;
cc:=cc shifted cr[S,O];
fillcolor:=1.3orange;
transparence cc;
draw subpath (0, length cc /2) of cc dashed evenly;
draw subpath (length cc /2,length cc) of cc;


marque_p := "croix";
MarquePoint(O);
marque_p := "rien";

%------------Vue de dessus
pair P;
P:=O shifted W;
cc:=cercles(P,rb*u);
draw cc;
cc:=cercles(P,cr*rb*u);
fillcolor:=1.3orange;
transparence cc;
draw cc;

marque_p := "croix";
MarquePoint(P);
marque_p := "rien";


label(TEX("\uline{Vue en perspective}"),T);
label(TEX("\uline{Vue de dessus}"),T shifted V);

draw cadre withcolor black withpen pencircle scaled 2pt;
clip currentpicture to cadre;

endfig;

endfor


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i:=1 upto 10:
beginfig(i+11)


path cc;
cc= cercles(O,rb*u);
cc := cc yscaled 0.2;
draw subpath (0, length cc /2) of cc dashed evenly;
draw subpath (length cc /2,length cc) of cc;

draw A--S--B;

draw S--O dashed evenly;


numeric cr;
cr:=1-0.1*i;

cc:= cercles(O,cr*rb*u);
cc:= cc yscaled 0.2;
cc:=cc shifted cr[S,O];
fillcolor:=1.3orange;
transparence cc;
draw subpath (0, length cc /2) of cc dashed evenly;
draw subpath (length cc /2,length cc) of cc;


marque_p := "croix";
MarquePoint(O);
marque_p := "rien";

%------------Vue de dessus
pair P;
P:=O shifted W;
cc:=cercles(P,rb*u);
draw cc;
cc:=cercles(P,cr*rb*u);
fillcolor:=1.3orange;
transparence cc;
draw cc;

marque_p := "croix";
MarquePoint(P);
marque_p := "rien";


label(TEX("\uline{Vue en perspective}"),T);
label(TEX("\uline{Vue de dessus}"),T shifted V);

draw cadre withcolor black withpen pencircle scaled 2pt;
clip currentpicture to cadre;

endfig;

endfor



end