jeudi 27 juin 2013

Loi de décroissance radioactive : une variation de représentation par Thomas Söll

\documentclass[dvipsnames]{article}
\usepackage{amsmath}
\usepackage{pst-grad,pst-plot}

\begin{document}
\begin{center}
\begin{pspicture}(-2,-1)(10,11)
\def\radioakt{%
\psscalebox{0.0125}{%
\pscircle[fillstyle=solid,fillcolor=yellow,linestyle=none](0,0){5}
\pswedge*(0,0){5}{0}{60}
\pswedge*(0,0){5}{120}{180}
\pswedge*(0,0){5}{240}{300}
\pscircle*[linecolor=yellow](0,0){1.5}
\pscircle*(0,0){1}
}}
\def\nichtradioakt{%
\pscircle*[linecolor=SeaGreen](0,0){0.0625}
}
\psframe[fillstyle=gradient,gradend=gray!30,gradbegin=gray!80,gradmidpoint=1,gradangle=45,linestyle=none](0,0)(7.5,10.2)
{\psset{fillstyle=gradient,gradend=white,gradbegin=NavyBlue!50,gradmidpoint=1,gradangle=90,linewidth=1pt,linecolor=NavyBlue}
\psframe(0.2,0)(1.3,10)
\psframe(1.7,0)(2.8,5)
\psframe(3.2,0)(4.3,2.5)
\psframe(4.7,0)(5.8,1.25)
\psframe(6.2,0)(7.3,0.625)
}
{\psset{fillstyle=gradient,gradend=white,gradbegin=SeaGreen!30,gradmidpoint=0,gradangle=90,linewidth=1pt,linecolor=NavyBlue}
\psframe(1.7,10)(2.8,5)
\psframe(3.2,10)(4.3,2.5)
\psframe(4.7,10)(5.8,1.25)
\psframe(6.2,10)(7.3,0.625)
}
\def\zufall{rand 301 mod 50 div round 50 div}
\rput(0.2,0){%
\multido{\i=0+1}{32}{%
\rput{! \zufall\space 777 mul}(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
}
}
\rput(1.7,0){%
\multido{\i=0+1}{16}{%
\rput{! \zufall\space 777 mul}(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
}
}
\rput(1.7,5){%
\multido{\i=0+1}{16}{%
\rput(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
}
}
\rput(3.2,0){%
\multido{\i=0+1}{8}{%
\rput{! \zufall\space 777 mul}(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
}
}
\rput(3.2,2.5){%
\multido{\i=0+1}{24}{%
\rput(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
}
}
\rput(4.7,0){%
\multido{\i=0+1}{4}{%
\rput{! \zufall\space 777 mul}(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
}
}
\rput(4.7,1.25){%
\multido{\i=0+1}{28}{%
\rput(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
}
}
\rput(6.2,0){%
\multido{\i=0+1}{2}{%
\rput{! \zufall\space 777 mul}(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
\rput{! \zufall\space 777 mul}(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\radioakt}
}
}
\rput(6.2,0.625){%
\multido{\i=0+1}{30}{%
\rput(! 0.12 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.35 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.625 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
\rput(! 0.88 \zufall\space add \zufall\space \i\space 5 mul 16 div add 0.121 add){\nichtradioakt}
}
}
\psaxes[ticks=none,labels=none,arrowinset=0.05,arrowscale=1.6,arrowlength=1.8]{->}(0,0)(-0.5,-0.5)(9,10.7)
\psplot[linecolor=red,algebraic,linewidth=1.5pt]{0.75}{9}{10*0.5^(2*(x-0.75)/3)}
\uput[0](9,0){$t$}
\rput[l](0.2,10.7){Proportion d'atomes radioactifs}
\psxTick(0.75){\text{d\'{e}but}}
\psxTick(2.25){T_{1/2}}
\psxTick(3.75){2T_{1/2}}
\psxTick(5.25){3T_{1/2}}
\psxTick(6.75){4T_{1/2}}
\psyTick(10){100\,\%}
\psyTick(5){50\,\%}
\psyTick(2.5){25\,\%}
\psyTick(1.25){12,5\,\%}
\end{pspicture}
\end{center}
\end{document}

2 commentaires:

  1. Bonjour. Il faut compiler avec QuickLaTeX, XuaLaTeX ou LuaLaTeX? J'ai tout essayé et aucun ne fonctionnen sans erreurs sur Linux (Scientific Linux) ni sur Windows 10/11.

    RépondreSupprimer
    Réponses
    1. Chez moi cela fonctionne très bien(sous windows 10 et MikTeX) avec :

      un clic droit sur le dossier qui contient le fichier (nommé par exemple loi-decroissance-radioactive-2.tex)
      cliquer sur : Ouvrir la fenêtre PowShell ici
      puis sur l'invite de commande >

      latex loi-decroissance-radioactive-2.tex ; dvips loi-decroissance-radioactive-2.dvi ; ps2pdf -dNOSAFER loi-decroissance-radioactive-2.ps

      Supprimer