Fichier arbre_alg.jps — Modifié le 3 Mai 2006 à 14 h 53

arbre_alg.pdf
Source
%% gh

%% Arbre d'une expression algébrique

%% échelle et étendue de l'image
60 setxunit
autocrop
.5 5.5 setxrange
.5 4.5 setyrange

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% définitions des couleurs

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


/coul0 {0 0 0 0.5 setcmykcolor} def %gris

/coul1 {noir} def
/coul2 {orange} def
/coul3 {rouge} def
/coul4 {bleu} def

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Les feuilles de l'arbre

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

coul1
1.5 setlinewidth
15 setfontsize
5 setdboxit 		%% reglage bordure de l?encadrement 
marks
/levelsep 1 def
/linearc .1 def 	%% pour arrondir les angles 

setPalatino

4 4 (Mult) Tb rootnode
[down
   (Moins) Tb
   [
      (Plus) Tb [(1) Tb (2) Tb]
      (Sin) Tb [(6) Tb]
   ]
   (4) Tb
] tree