\documentclass{article}
\usepackage{pst-grad,multido}%
\input{random.tex} % From Donald Arseneau (on macros/generic on CTAN)
% Manuel Luque : manuel.luque27@gmail.com
% 6 avril 2003
\definecolor{Bluea}{cmyk}{.2,0,0,0}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\manometre{%
\rput(0,0){%
\psline[doubleline=true,doublesep=0.12,linearc=0.2](0,0)(2,0)(2,-2)
\pscircle[doubleline=true,fillstyle=solid](0,0){0.9}
\psarc(0,0){0.65}{-60}{240}
\multido{\i=-60+30}{11}{\psline(0.65;\i)(0.45;\i)}
\psline[arrowscale=2,linewidth=2\pslinewidth]{->}(0.5;-20)(0.65;160)
\pscircle[fillstyle=solid]{0.1}}}
\def\Bouchon{%
\psellipse[linewidth=1.5\pslinewidth](0,0.2)(0.6,0.1)
\begingroup
\psset{fillstyle=solid,fillcolor=lightgray}
\psellipse(0,-0.4)(0.32,0.1)
\pspolygon(-0.5,0.5)(-0.32,-0.4)(0.32,-0.4)(0.5,0.5)
\psellipse[linestyle=none,dimen=outer,linewidth=0.07](0,-0.4)(0.32,0.1)
\psellipse(0,0.5)(0.5,0.1)
\endgroup
\psellipticarc[linewidth=1.5\pslinewidth](0,0.2)(0.6,0.1){180}{0}
\psline[doubleline=true,doublesep=0.12,doublecolor=white](-0.2,0.5)(-0.2,0.6)
\psline[doubleline=true,dimen=outer,doublesep=0.05,doublecolor=red](0.2,0.5)(0.2,1)}
\newcommand\erlen{%
\begin{psclip}{%
\pspolygon[linestyle=none,linearc=0.2](-0.6,3.2)(-0.4,3)(-0.4,2)(-1.2,0)(1.2,0)(0.4,2)%
(0.4,3)(0.6,3.2)}
\psclip{\pscustom[linecolor=cyan,fillstyle=solid,fillcolor=Bluea]{%
\pscurve(-2,0.9)(-1.75,1)(-1.5,0.9)(-1.25,1)(-1,0.9)
(-0.75,1)(-0.5,0.9)(-0.25,1)(0,0.9)
(0.25,1)(0.5,0.9)(0.75,1)(1,0.9)
(1.25,1)(1.5,0.9)(1.75,1)(2,0.9)
\psline(2,0.9)(2,-1)(-2,-1)(-2,0.9)}}
\BILLES
\endpsclip
\end{psclip}
\psline[linearc=0.2](-0.6,3.2)(-0.4,3)(-0.4,2)(-1.2,0)(1.2,0)(0.4,2)
\psline[linearc=0.05](0.4,2)(0.4,2.4)(1.4,2.4)
\psline[linearc=0.05](1.4,2.6)(0.4,2.6)(0.4,3)(0.6,3.2)}
\def\thermometre{%
\pspolygon[linearc=0.05,fillstyle=solid,fillcolor=red](0.05,3)(0.05,-1.2)
(0.15,-1.2)(0.15,-1.8)(-0.15,-1.8)(-0.15,-1.2)(-0.05,-1.2)(-0.05,3)
\psframe[linearc=0.05,fillstyle=solid](-0.05,1)(0.05,3)}
\makeatletter
\newdimen\BX
\newdimen\BY
\newdimen\RAYONBULLE
\makeatletter
\newcommand{\BILLES}[1][50]{%
\multido{\IBULLE=1+1}{#1}{%
\setrandim{\BX}{-1.5\psunit}{1.5\psunit}
\setrandim{\BY}{0\psunit}{1\psunit}
\pst@dimh=\BY
\setrandim{\RAYONBULLE}{0.01\psunit}{0.1\psunit}
\ifdim\BY>2\psunit \multiply \RAYONBULLE by 3
\else
\ifdim\BY < 2\psunit \ifdim\BY >1\psunit \multiply \RAYONBULLE by 2\fi
\else
\multiply \RAYONBULLE by 1
\fi
\fi
\rput(0,0){%
\pscircle[style=BilleThreeD](\BX,\BY){\RAYONBULLE}}}}
\newpsstyle{BilleThreeD}{linestyle=none,fillstyle=gradient,gradmidpoint=0,gradend=white,GradientCircle}
\pagestyle{empty}
\begin{document}
\begin{center}
\begin{pspicture}(-5,0)(5,6)
\rput(-2.2,4){\manometre}
\erlen
\rput(0.2,3){\thermometre}
\rput(0,3){\Bouchon}
\psline{->}(1.5,2.5)(2.5,2.5)
%\uput[0](2.5,2.5){vers trompe \`a eau}
\end{pspicture}
\end{center}
\end{document}
Aucun commentaire:
Enregistrer un commentaire