diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex | 69 |
1 files changed, 49 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex b/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex index e28dd78cbbb..073ac3c6994 100644 --- a/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex @@ -1,21 +1,24 @@ -%% $Id: pst-lsystem-doc.tex 815 2018-09-25 06:16:11Z herbert $ +%% $Id: pst-lsystem-doc.tex 820 2018-09-26 09:52:39Z herbert $ \documentclass[fontsize=11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false, headings=small, headinclude=false,footinclude=false,oneside,abstract=on]{pst-doc} \usepackage{pst-lsystem} \let\pstFV\fileversion \usepackage{dtk-logos} +\usepackage{xltabular} \renewcommand\bgImage{% -%\psset{yunit=4cm,xunit=3} -\begin{pspicture}(-2,-1.5)(4,6) - \pslsystem[X=-FX++FY-, - Y=+FX--FY+, - Ftype=1, - Start=X, - Angle=45, - N=9, - linewidth=0.1pt, - BaseLength=2mm](0,0) -\end{pspicture}} +\begin{pspicture}(-2,-0.5)(3,6) +\pslsystem[ + Start=Y, + X={X[-FFF][+FFF]FX}, + Y={YFX[+Y][-Y]}, + Angle=25, + N=6, + Ftype=1, + BaseLength=2.5pt, + usecolor=2](0,0) +\psdot(0,0) +\end{pspicture} +} \addbibresource{\jobname.bib} @@ -35,7 +38,7 @@ \begin{document} \title{\texttt{pst-lsystem}} -\subtitle{Creating images, based on the Lindenmeyer-system; v.\pstFV} +\subtitle{Creating images, based on the Lindenmayer-system; v.\pstFV} \author{Herbert Voß} \docauthor{} \date{\today} @@ -53,7 +56,7 @@ of having older versions, go to \url{http://www.CTAN.org/} and load the newest v \vfill\noindent Thanks to \\ -Michel Charpontier, +Michel Charpentier, and last but not least \url{http://mathworld.wolfram.com}. @@ -92,15 +95,15 @@ defined by the three functions $F$, $X$, and $Y$. At least one function must be The following optional arguments for the macro are possible: -\begin{tabularx}{\linewidth}{@{} l l X @{}}\toprule +\begin{xltabular}{\linewidth}{@{} l l X @{}}\toprule \emph{name} & \emph{default} & \emph{menaing}\\\midrule \Lkeyword{F} & & Rule $F\rightarrow(F)$\\ \Lkeyword{X} & & Rule $X\rightarrow(F,X,Y)$\\ \Lkeyword{Y} & & Rule $Y\rightarrow(F,X,Y)$\\ \Lkeyword{Start} & & Startrule $S\rightarrow(F,X,Y)$\\ -\Lkeyword{Angle} & 0 & Angle for the drection change\\ +\Lkeyword{Angle} & 45 & Angle for the drection change\\ \Lkeyword{N} & 5 & Number of the recursive calls\\ -\Lkeyword{Ftype} & 4 & How the F-rule should handled\\ +\Lkeyword{Ftype} & 4 & How the F-rule should be handled\\ \Lkeyword{BaseLength} & 1mm & The length of a base line, created by the ruke F (Forward)\\ \Lkeyword{usecolor} & 0 & Which color should be used for the lines.\\ %\define@key[psset]{pst-lsystem}{order}[5]{\pst@getint{#1}\psk@lsystem@order} @@ -109,16 +112,32 @@ The following optional arguments for the macro are possible: %\define@key[psset]{pst-lsystem}{size}[4]{\pst@getint{#1}\psk@lsystem@size} %\define@key[psset]{pst-lsystem}{type}[0]{\pst@getint{#1}\psk@lsystem@type} \bottomrule -\end{tabularx} +\end{xltabular} +\bigskip If the rules contain square brackets then it must be enclosed by braces: \verb|X=F[-X]| is wrong and \verb|X={F[-X]}| is correct. \subsection{Different types for the F-rule} It depends to the given rule(s) what kind of the F-type must be used. -There are four possibilities: - +There are five possibilities: + +\begin{xltabular}{\linewidth}{@{} >{\ttfamily}l X @{}} +0 & $F\rightarrow \textrm{draw line element}$ \\ + & in PostScript: \verb|/F { D } def|\\ +1 & $F\rightarrow \textrm{If loop variable }=0 \textrm{ then draw line element}$\\ + & in PostScript: \verb|/F { 0 eq { D } if } def|\\ +2 & $F\rightarrow \textrm{If loop variable }=0 \textrm{ then draw line element and keep variable}$\\ + & in PostScript: \verb|/F { dup 0 eq { D } if } def|\\ +3 & $F\rightarrow \textrm{draw line element and delete current loop variable}$\\ + & in PostScript: \verb|/F { pop D } def|\\ +4 & $F\rightarrow \textrm{If loop variable }=0 $ then draw line element! If not $=0$ decrease loop variable, duplicate it + $n-1$ times (n is the number of functions in $F$) and put F-rule on stack\\ + & in PostScript: \verb|/F { dup 0 eq { D }{ 1 sub N 1 sub {dup} repeat F-rule } ifelse pop } def| +\end{xltabular} + +\iffalse \begin{verbatim} \ifcase\psk@lsystem@Ftype /F { D } def % type 0 @@ -132,6 +151,7 @@ There are four possibilities: /F { dup 0 eq { D }{ 1 sub \psk@lsystem@Fnumber {dup} repeat \psk@lsystem@F } ifelse pop } def \fi \end{verbatim} +\fi The function D does nothing else than drawing a line in the current direction. Its length is given by the optional parameter BaseLength. @@ -173,6 +193,7 @@ There are four predefined color modes, where mode=0 is no color. +\clearpage \subsection{Kochflake} If the rule for \Lkeyword{Start} has more than one function name, one has to repeat @@ -244,7 +265,10 @@ for the first one. That is done already internally: \end{pspicture} \end{LTXexample} +\clearpage + +\clearpage \subsection{Plant 4} @@ -281,6 +305,9 @@ for the first one. That is done already internally: \end{pspicture} \end{LTXexample} +\clearpage + +\clearpage \subsection{Plant 6} @@ -312,6 +339,8 @@ for the first one. That is done already internally: \end{pspicture} \end{LTXexample} +\clearpage + \subsection{Plant 8} |