Repository Public MIT Research preview
1% S06-F04 — Durée de vie de six souvenirs sur l'horloge simulée de la démonstration.2% Idée : un souvenir a une fin prévue dès son écriture ; il peut finir plus tôt (suppression, oubli3% complet), jamais plus tard. Toutes les valeurs viennent de S06-F04-donnees.tex (généré par le code).4\input{S06-F04-donnees.tex}%5\begin{tikzpicture}[x=1mm, y=1mm]6 \def\AtlasFigMemOrigine{31}% abscisse du jour 0, en mm7 \def\AtlasFigMemEchelle{1.02}% millimètres par jour simulé8 % Axe des jours9 \draw[atlasRule, line width=.8pt] (\AtlasFigMemOrigine,5.5) -- ++(108*\AtlasFigMemEchelle,0);10 \foreach \j in {0,20,...,100}{11 \draw[atlasRule, line width=.6pt] (\AtlasFigMemOrigine+\j*\AtlasFigMemEchelle,5.5) -- ++(0,-1.2);12 \node[atlas note, anchor=north] at (\AtlasFigMemOrigine+\j*\AtlasFigMemEchelle,4.2) {\j};13 }14 \node[atlas note, anchor=north east] at (\AtlasFigMemOrigine-2.5,4.2) {jour simulé};15 \draw[atlasRule, line width=.5pt, dash pattern=on 1.5pt off 2pt]16 (\AtlasFigMemOrigine+\AtlasFigMemJourFinal*\AtlasFigMemEchelle,5.5) -- ++(0,42.6);17 \node[atlas note, anchor=south east] at (141.5,48.4)18 {jour \AtlasFigMemJourFinal\ : « tout oublier »};19 % Une barre par souvenir20 \newcommand{\AtlasFigMemVie}[7]{%21 \pgfmathsetmacro{\yy}{50.2-#1*6.9}22 \pgfmathsetmacro{\xa}{\AtlasFigMemOrigine+#4*\AtlasFigMemEchelle}23 \pgfmathsetmacro{\xb}{\AtlasFigMemOrigine+#5*\AtlasFigMemEchelle}24 \pgfmathsetmacro{\xp}{\AtlasFigMemOrigine+min(#7,108)*\AtlasFigMemEchelle}25 \node[atlas label, anchor=west] at (.5,\yy) {\textbf{#2}};26 \node[atlas note, anchor=west] at (8.6,\yy) {#3};27 \ifnum#6=1\relax\else28 \draw[atlasMuted, line width=.7pt, dash pattern=on 2.4pt off 1.8pt] (\xb,\yy-1.9) rectangle (\xp,\yy+1.9);29 \fi30 \ifcase#6\relax\or31 \fill[atlasFlow, fill opacity=.28, draw=atlasFlow, line width=.9pt] (\xa,\yy-1.9) rectangle (\xb,\yy+1.9);32 \ifnum#5>60\relax33 \node[atlas note, text=atlasFg, anchor=east] at (\xb-1.2,\yy) {échéance atteinte : jour #5};34 \else35 \node[atlas note, text=atlasFg, anchor=west] at (\xb+1.2,\yy) {échéance atteinte : jour #5};36 \fi37 \or38 \fill[atlasHazard, fill opacity=.28, draw=atlasHazard, line width=.9pt] (\xa,\yy-1.9) rectangle (\xb,\yy+1.9);39 \node[atlas note, text=atlasFg, anchor=west] at (\xp+1.2,\yy) {supprimé sur demande au jour #5 ; échéance prévue : jour #7};40 \or41 \fill[atlasFlow, fill opacity=.28, draw=atlasFlow, line width=.9pt] (\xa,\yy-1.9) rectangle (\xb,\yy+1.9);42 \node[atlas note, text=atlasFg, anchor=east] at (\xb-1.2,\yy) {oubli complet au jour #5 ; échéance prévue : jour #7};43 \fi}44 \AtlasFigMemVies45\end{tikzpicture}46