diff options
author | Karl Berry <karl@freefriends.org> | 2009-05-23 00:23:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-05-23 00:23:51 +0000 |
commit | a683c3d7e9fac38ec713f23fb6b9d2c7143aea82 (patch) | |
tree | 424ab223921f85fd3f167a4ccd0e2d37d05c2927 /Master/texmf-dist/doc/latex/latex-graphics-companion/4-10-5.ltx | |
parent | 5beb5368a684995153c8566797ba054f21c666af (diff) |
move english latex doc out of texmf-doc
git-svn-id: svn://tug.org/texlive/trunk@13412 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/latex-graphics-companion/4-10-5.ltx')
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-graphics-companion/4-10-5.ltx | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-graphics-companion/4-10-5.ltx b/Master/texmf-dist/doc/latex/latex-graphics-companion/4-10-5.ltx new file mode 100644 index 00000000000..b4ede3f1ee5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/latex-graphics-companion/4-10-5.ltx @@ -0,0 +1,46 @@ +\documentclass{ppex} +\nonstopmode +\usepackage {pstcol,multido} +\pagestyle{empty} +\setlength\textwidth{183.0pt} +\begin{document} +\ResetPreambleCommands +\ReadyForTheFray +\usepackage {pstcol,multido} +\input random.tex +\newdimen\X \newdimen\Y\newdimen\Coor +% #1 is number of steps +\newcommand{\RandomWalk}[1]{% +\setrandim\X{0pt}{1pt} +\setrandim\Y{0pt}{1pt} +\psdots[dotstyle=*,dotsize=6pt] + (\pointless\X,\pointless\Y) +\pscustom{% + \moveto(\pointless\X,\pointless\Y) + \multido{\i=1+1}{#1}{% + \MoveCoordinate{\X} + \MoveCoordinate{\Y} + \lineto(\pointless\X,\pointless\Y)}}} +% Computation of new horizontal +% or vertical position of point +\newcommand{\MoveCoordinate}[1]{% + \setrandim\Coor{-0.03pt}{0.03pt} + \advance #1 by \Coor + \ifdim#1>1pt #1=1pt \fi + \ifdim#1<0pt #1=0pt \fi +} +\newcommand{\randomdemo}[2]{{% + \psframe[linewidth=0.6mm](1,1) + \rput(#1,#2){\RandomWalk{300}} + \psset{linecolor=red} + \rput(#1,#2){\RandomWalk{200}} + \psset{linecolor=green} + \rput(#1,#2){\RandomWalk{100}} +}} +\psset{unit=5,dimen=middle} +\framebox{\begin{pspicture}(1,3) + \randomdemo{0}{0} + \randomdemo{0}{1} + \randomdemo{0}{2} +\end{pspicture}} +\end{document} |