%% PhS
%%
%% échelle et étendue de l'image
50 setxunit
-0.5 10 setxrange
-1 6 setyrange
/xgauche -6 def %% c'est la limite gauche de l'image
/xdroite 6 def %% c'est la limite droite de l'image
/ybasse -4 def %% c'est la limite basse de l'image
/yhaute 4 def %% c'est la limite haute de l'image
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DANGER !! Il ne faut pas utiliser de variables
%% DANGER !! qui commence par les lettres :
%% DANGER !! xmin, xmax, ymin et ymax...
%% DANGER !! Utiliser x_min, y_min...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% plages initiales pour les paramètres (peuvent être modifiées pour chaque fonctions tracées
/x_min -5 def
/x_max 5 def
/t_min -9 def
/t_max 9 def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% procédures
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% on donne ici x(t)
/xdet {
1 dict begin
/t exch def
t
end
} def
%% on donne ici y(t)
/ydet {
1 dict begin
/t exch def
t dup mul dup mul -0.2 mul t dup mul add t 0.6 mul add 1 add
end
} def
%% dessine un bout de droite
/bddroite { %% Ax Ay Bx By kg (=proportion vers A) kd (=prop vers B)
8 dict begin
/kd exch def
/kg exch def
/By exch def
/Bx exch def
/B {Bx By} def
/Ay exch def
/Ax exch def
/A {Ax Ay} def
gsave
[A A B vecteur kg mulv addv A A B vecteur kd mulv addv] ligne
grestore
end
} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% définitions des couleurs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/coul1 {120 255 div 70 255 div 9 255 div setrgbcolor} def
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% tracés
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% tracé des axes et du point Origine
1 setlinewidth
15 setfontsize
noir
continu
traceaxes
marks
tracerepere
3 setlinewidth
coul1
-2.2 1.715 settrange
{xdet 2.5 add} {ydet 1 add} courbeparam
-3.01 1.76 settrange
{xdet neg 5.97 add} {ydet -3.23 add 0.3 mul 4.2405 add} courbeparam
noir
[1.07 2.345 2.2 1.915 4.25 4.24 6.26 3.55 7.42 3.68] points
rouge
1 setlinewidth
[1.07 2.345 -0.8 0 addv 1.07 2.345 0.8 0 addv] (<->) ligne
[2.2 1.915 -0.8 0 addv 2.2 1.915 0.8 0 addv] (<->) ligne
[4.25 4.24 -0.8 0 addv 4.25 4.24 0.8 0 addv] (<->) ligne
[6.26 3.55 -0.8 0 addv 6.26 3.55 0.8 0 addv] (<->) ligne
[7.42 3.68 -0.8 0 addv 7.42 3.68 0.8 0 addv] (<->) ligne
vert
pointilles
[0.3 0 0.3 0.85 8.98 0.85 8.98 0] (-) ligne
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% texte
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
setTimesItalic
vert
$a$
0.3 -0.3 [3 dup] cctexlabel
$b$
9 -0.6 [3 dup] cctexlabel