%@AUTEUR:Guillaume Connan
prologues:=2;
input courbes;
input geo;
color vert_e, turquoise, orange, vert_fonce, rose, vert_mer, bleu_ciel, or, rouge_v,bleu_m,bleu,bleu_f;
vert_e:=(0,0.790002,0.340007);
turquoise:=(0.250999,0.878399,0.815699);
orange:=(0.589999,0.269997,0.080004);
vert_fonce:=(0,1.4*0.392193,0);
rose:=(1.0, 0.752907, 0.796106);
bleu_ciel:=(1.2*0.529405,1.2*0.807794,1);%.2*0.921598);
or:=(1,0.843104,0);
rouge_v:=(0.829997,0.099994,0.119999);
bleu_m:=(0.7*0.529405,0.7*0.807794,0.7);%*0.921598);
bleu_f:=(0.211762,0.3231176,0.3686392);
bleu:=(0.529405,0.807794,1);
%Reci Puissances IMPAIRES
%
beginfig(1);
vardef axes =
drawarrow (ux*xmin,0) -- (ux*xmax,0); % axe des x
drawarrow ((0,uy*ymin) -- (0,uy*ymax)) ; % axe des y
label.lrt(btex $x$ etex,(xmax*ux,0)); % label de l'axe des x
label.urt(btex $y$ etex,(0,ymax*uy)); % label de l'axe des y
enddef;
% Déclarations des constantes %
ux:=1cm; uy:=0.5ux;
xmin:=-4.5; xmax:=4.5;
ymin:=-9; ymax:=9;
coefficient:=1; % coefficient d'échelle
%Tracé des axes
axes;
label.llft(btex $0$ etex,(-.1*ux,-.15*uy));
vardef f(expr x) =0.3*x*x*x enddef;
vardef trace (suffix g)(expr a,b,inc) =
save i; numeric i;
for i=a step inc until b:
(i*ux,f(i)*uy) ..
endfor (b*ux,f(b)*uy)
enddef;
draw (trace(g,-3,3,.10)) withcolor bleu_m withpen pencircle scaled 2bp;
vardef f(expr x) =(x/0.3)**0.333 enddef;
vardef trace (suffix g)(expr a,b,inc) =
save i; numeric i;
for i=a step inc until b:
(i*ux,f(i)*uy) ..
endfor (b*ux,f(b)*uy)
enddef;
draw (trace(g,0.01,4.5,.10)) withcolor vert_e withpen pencircle scaled 2bp;
draw( (trace(g,0.01,4.5,.10))scaled -1) withcolor vert_e withpen pencircle scaled 2bp;
draw ((-4*ux,-4*uy)--(4*ux,4*uy)) dashed evenly withcolor 0.5*bleu withpen pencircle scaled 2bp;
label.urt(btex $y=x^{2n+1}$ etex scaled 1.5, (3*ux,0.3*27*uy)) withcolor bleu_m;
label.urt(btex $y=\sqrt[2n+1]{x}$ etex scaled 1.5, (4.5*ux,f(4.5)*uy)) withcolor vert_e;
endfig;
end