You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
9.2. AU SUJET DES ARBRES 137<br />
9.1.6 Exercice<br />
Àtitred’exercice,faitessubirunquartdetourettriplezlafigure.<br />
Texte<br />
Solution<br />
\begin{tikzpicture} [scale=3,rotate=90,transform shape]<br />
\draw[,>=stealth’,very thick] (1,0)--(0,0)--(0,1);<br />
\path (1.5,2) node{$\oplus$}<br />
node[left,scale=1.5,rotate=45]{Texte};<br />
\end{tikzpicture}<br />
9.2 Au sujet des arbres<br />
En mathématiques, la structure d’arbre est un cas important de la théorie des graphes. TikZ<br />
propose de nombreuses opérations spécifiques pour la construction des arbres.<br />
Nous allons montrer sur un exemple vu précédemment sous forme d’exercice, comment dessiner<br />
d’un arbre généalogique :<br />
% définition des styles<br />
\tikzstyle{lien}=[->,>=stealth,rounded corners=5pt,thick]<br />
\tikzset{individu/.style={draw,thick,fill=#1!25},<br />
individu/.default={green}}<br />
% définition de l’arbre<br />
\begin{tikzpicture}<br />
\node[individu] (B) at (0,0) {Bibi};<br />
\node[individu=blue] (P) at (-3,2) {Papa};<br />
\node[individu=red] (M) at (3,2) {Maman};<br />
\node[individu=blue] (GPP) at (-4.5,4) {Pépé};<br />
\node[individu=red] (GMP) at (-1.5,4) {Mémé};<br />
\node[individu=blue] (GPM) at (1.5,4) {Papy};<br />
\node[individu=red] (GMM) at (4.5,4) {Mamie};<br />
\draw[lien] (B) |- (-1,1) -| (P);<br />
\draw[lien] (B) |- (1,1) -| (M);<br />
\draw[lien] (P) |- (-4,3) -| (GPP);<br />
\draw[lien] (P) |- (-2,3) -| (GMP);<br />
\draw[lien] (M) |- (2,3) -| (GPM);<br />
\draw[lien] (M) |- (4,3) -| (GMM);<br />
\end{tikzpicture}