// gm_probabilitytree.asy // Extension destinée à dessiner un arbre de probabilités // C'est une première version, non documentée, en phase de test, // téléchargeable ici : gm_probabilitytree.asy import gm_probabilitytree; DistVertEntreNoeuds = .2cm; // entre noeuds "terminaux" DistHoriEntreNiveaux = 1.75cm; HauteurNoeudMinimale = .2cm; StyleEvenParDefaut = 1bp+black; StyleBackGrParDefaut = invisible; StyleProbParDefaut = .8red; // Tracé de l'arbre relatif à un schéma de Bernouilli Bernouilli(Succes="$A$", probS="$\frac{2}{3}$", Echec="$\overline{A}$", probE="$\frac{1}{3}$", repet=4, pos=(0,0)); // Syntaxe : // void Bernouilli(Label Succes="$S$", Label probS="$p$", // Label Echec="$\overline{S}$", Label probE="$q$", // int repet=2, pair pos=(0,0)) shipout(bbox(2mm,white));