texlive[49556] Master/texmf-dist: pst-lsystem (31dec18)

commits+karl at tug.org commits+karl at tug.org
Mon Dec 31 23:10:04 CET 2018


Revision: 49556
          http://tug.org/svn/texlive?view=revision&revision=49556
Author:   karl
Date:     2018-12-31 23:10:03 +0100 (Mon, 31 Dec 2018)
Log Message:
-----------
pst-lsystem (31dec18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes
    trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md
    trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib
    trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex
    trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes	2018-12-31 22:09:47 UTC (rev 49555)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes	2018-12-31 22:10:03 UTC (rev 49556)
@@ -1,4 +1,5 @@
 ..... pst-lsystem.tex
+0.02  2018-12-31  some code cleanup
 0.01  2018-09-23  first CTAN version
 
 

Modified: trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md	2018-12-31 22:09:47 UTC (rev 49555)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md	2018-12-31 22:10:03 UTC (rev 49556)
@@ -1,4 +1,9 @@
-# pst-lsystem: creating images defined by a L-system
+# pst-lsystem: creating images defined by a L-system:
+A L-system or Lindenmayer system is a parallel rewriting system and a type of 
+formal grammar. An L-system consists of an alphabet of symbols that can be used 
+to make strings, a collection of production rules that expand each symbol into 
+some larger string of symbols, an initial »axiom« string from which to begin construction, 
+and a mechanism for translating the generated strings into geometric structures. 
 
 Save the files pst-lsystem.sty|pro|tex in a directory, which is part of your 
 local TeX tree. The pro file should go into $TEXMF/dvips/pstricks/
@@ -17,4 +22,4 @@
 %% in directory macros/latex/base/lppl.txt.
 
 
-%% $Id: README.md 815 2018-09-25 06:16:11Z herbert $
+%% $Id: README.md 819 2018-09-26 06:40:48Z herbert $

Modified: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib	2018-12-31 22:09:47 UTC (rev 49555)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib	2018-12-31 22:10:03 UTC (rev 49556)
@@ -27,30 +27,42 @@
 
 
 @Book{companion,
-  author	= {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}},
+  author	= {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Voß},
   title		= {The {\LaTeX} {G}raphics {C}ompanion},
   publisher	= {{Addison-Wesley Publishing Company}},
   edition	= 2,
   year		= {2007},
-  address	= {Reading, Mass.}
+  address	= {Reading, Mass. (USA)}
 }
 
 @Book{PSTricks2,
-  author	= {Herbert Vo\ss},
+  author	= {Herbert Voß},
   title		= {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
-  edition	= {4.},
-  publisher	= {DANTE -- Lehmanns},
-  year		= {2007},
-  address	= {Heidelberg/Hamburg}
+  edition	= {7},
+  publisher	= {DANTE and Lehmanns Media},
+  year		= {2017},
+  address	= {Heidelberg and Berlin}
 }
 
+
+ at Book{PSTricksE,
+  author	= {Herbert Voß},
+  title		= {\texttt{PSTricks} -- {G}raphics and {P}ost{S}cript for \LaTeX},
+  edition	= {1},
+  publisher	= {UIT},
+  date		= {2011},
+  location	= {Cambridge -- UK}
+}
+
+
+
 @Book{LaTeXRef,
-  author	= {Herbert Vo\ss},
+  author	= {Herbert Voß},
   title		= {\LaTeX\ Referenz},
-  edition	= {1.},
-  publisher	= {DANTE -- Lehmanns},
-  year		= {2007},
-  address	= {Heidelberg/Hamburg}
+  edition	= {3},
+  publisher	= {DANTE and Lehmanns Media},
+  year		= {2012},
+  address	= {Heidelberg and Berlin}
 }
 @Book{PostScript,
   Author         = {Kollock, Nikolai G.},
@@ -61,30 +73,47 @@
   year           = 1989,
 }
 
- at Manual{pstricks,
+ at online{pstricks,
   Title          = {PSTricks - {\PS} macros for generic {\TeX}},
   Author         = {{Timothy van} Zandt},
-  Organization   = {},
-  Address        = {\url{http://www.tug.org/application/PSTricks}},
-  Note           = {},
+  url       = {http://www.tug.org/application/PSTricks},
   year           = 1993
 }
 
-Michel Charpentier. Dragon Curve in PostScript. http://www.cs.unh.
-edu/~charpov/Programming/L-systems/simple-dragon.ps.
-[3] Michel Charpentier. L-systems in PostScript. http://www.cs.unh.edu/
-~charpov/Programming/L-systems/plant2.ps.
-[4] Michel Charpentier. Ulam’s Spiral in PostScript. http://www.cs.unh.edu/
-~charpov/Programming/PostScript-primes/primes-distribution.ps.
-[5] Jim Lund. DoodleTron (a L-system Iterator). http://elegans.uky.edu/
-jiml/lsystem/ls_index.html.
-[6] Przemyslaw Prusinkiewicz and Aristid Lindenmayer. The Algorithmic Beauty
-of Plants. Springer-Verlag, 1990.
-[7] Pavel Tišnovský. L-systémy: přírodní objekty i umělé artefakty. http://www.
-root.cz/clanky/l-systemy-prirodni-objekty-i-umele-artefakty.
-[8] Eric W. Weisstein. Dragon Curve. From MathWorld–A Wolfram Web
-Resource. http://mathworld.wolfram.com/PrimeSpiral.html.
-[9] Eric W. Weisstein. Lindenmayer Systems. From MathWorld–A Wolfram Web
-Resource. http://mathworld.wolfram.com/LindenmayerSystem.html.
-[10] Eric W. Weisstein. Ulam’s Spiral. From MathWorld–A Wolfram Web
-Resource. http://mathworld.wolfram.com/PrimeSpiral.html.
+ at online{charp,
+  author= {Michel Charpentier},
+  title = {Dragon Curve in PostScript},
+  url = {http://www.cs.unh.edu/~charpov/Programming/L-systems/simple-dragon.ps},
+  urldate={2018-09-24},
+}
+
+ at online{charp2,
+  author= {Michel Charpentier},
+  title = {L-systems in PostScript},
+  url = {http://www.cs.unh.edu/~charpov/Programming/L-systems/plant2.ps},
+  urldate={2018-09-24},
+}
+
+ at book{Linde,
+author={Przemyslaw Prusinkiewicz and Aristid Lindenmayer},
+title={The Algorithmic Beauty of Plants},
+publisher= {Springer-Verlag}, 
+date={1990},
+}
+
+ at article{charp3,
+  author= {Michel Charpentier},
+  title={Programming L-Systems in PostScript}, 
+  journal = {Zpravodaj Československého sdružení uživatelů \TeX u},
+  organisation = {CSTUG: Czech and Slovak \TeX\ Users Group}, 
+  date = {2012},
+  doi={10.5300/2012-1/9},
+number = 1,
+pages={9--19},
+url={http://bulletin.cstug.cz/pdf/bul_0013.pdf},
+urldate = {2018-09-25},
+}
+
+
+
+

Modified: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex	2018-12-31 22:09:47 UTC (rev 49555)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex	2018-12-31 22:10:03 UTC (rev 49556)
@@ -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 @@
 
 \vfill\noindent
 Thanks to \\
-Michel Charpontier,
+Michel Charpentier,
 and last but not least
     \url{http://mathworld.wolfram.com}.
 
@@ -92,15 +95,15 @@
 
 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 at key[psset]{pst-lsystem}{order}[5]{\pst at getint{#1}\psk at lsystem@order}
@@ -109,8 +112,9 @@
 %\define at key[psset]{pst-lsystem}{size}[4]{\pst at getint{#1}\psk at lsystem@size}
 %\define at key[psset]{pst-lsystem}{type}[0]{\pst at getint{#1}\psk at 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.
 
@@ -117,8 +121,23 @@
 \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 at lsystem@Ftype
   /F { D } def    % type 0
@@ -132,6 +151,7 @@
   /F { dup 0 eq { D }{ 1 sub \psk at lsystem@Fnumber {dup} repeat \psk at 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 @@
 
 
 
+\clearpage
 \subsection{Kochflake}
 
 If the rule for \Lkeyword{Start} has more than one function name, one has to repeat
@@ -244,8 +265,11 @@
 \end{pspicture}
 \end{LTXexample}
 
+\clearpage
 
 
+\clearpage
+
 \subsection{Plant 4}
 
 \begin{LTXexample}[pos=r]
@@ -281,7 +305,10 @@
 \end{pspicture}
 \end{LTXexample}
 
+\clearpage
 
+\clearpage
+
 \subsection{Plant 6}
 
 \begin{LTXexample}[pos=r]
@@ -312,7 +339,9 @@
 \end{pspicture}
 \end{LTXexample}
 
+\clearpage
 
+
 \subsection{Plant 8}
 
 \begin{LTXexample}[pos=r]

Modified: trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex	2018-12-31 22:09:47 UTC (rev 49555)
+++ trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex	2018-12-31 22:10:03 UTC (rev 49556)
@@ -25,8 +25,8 @@
 % interface to the `xkeyval' package
 \pst at addfams{pst-lsystem}
 
-\def\fileversion{0.01}
-\def\filedate{2018/09/22}
+\def\fileversion{0.02}
+\def\filedate{2018/12/31}
 \message{`PST-lsystem' v\fileversion, \filedate\space (hv)}
 %
 \pstheader{pst-lsystem.pro}
@@ -35,6 +35,8 @@
   \def\pst at tempg{}%
   \pst at cntm=0
   \ifx\relax#2\relax\else\pst at lsystem@@checkRule#2;\fi
+%  \let#1\pst at tempg
+%  \@namedef{\expandafter\@gobble\detokenize\expandafter{\string#1number}}{\the\pst at cntm}%
   \expandafter\let\csname#1\endcsname\pst at tempg
   \global\expandafter\edef\csname#1number\endcsname{\the\pst at cntm}%
 }
@@ -54,22 +56,17 @@
 \define at key[psset]{pst-lsystem}{X}[]{\pst at lsystem@checkRule{psk at lsystem@X}{#1}}
 \define at key[psset]{pst-lsystem}{Y}[]{\pst at lsystem@checkRule{psk at lsystem@Y}{#1}}
 \define at key[psset]{pst-lsystem}{Start}[]{\pst at lsystem@checkRule{psk at lsystem@Start}{#1}}
-\define at key[psset]{pst-lsystem}{Angle}[0]{\def\psk at lsystem@Angle{#1 }}
+\define at key[psset]{pst-lsystem}{Angle}[45]{\def\psk at lsystem@Angle{#1 }}
 \define at key[psset]{pst-lsystem}{N}[5]{\def\psk at lsystem@N{#1 }}
 \define at key[psset]{pst-lsystem}{Ftype}[4]{\def\psk at lsystem@Ftype{#1 }}
 \define at key[psset]{pst-lsystem}{N2}[4]{\def\psk at lsystem@Nii{#1 }}
 \define at key[psset]{pst-lsystem}{BaseLength}[1mm]{\pst at getlength{#1}\psk at lsystem@BaseLength}
-\psset[pst-lsystem]{F={},X={},Y={},Start={},Angle=0,N=5,Ftype=4,BaseLength=1mm}
+\psset[pst-lsystem]{F={},X={},Y={},Start={},Angle=45,N=5,Ftype=4,BaseLength=1mm}
 %
-\define at key[psset]{pst-lsystem}{usecolor}[0]{\def\psk at lsystem@color{#1}}
+\define at key[psset]{pst-lsystem}{usecolor}[0]{\def\psk at lsystem@color{#1}}% 0 is no color
 %
 \define at key[psset]{pst-lsystem}{order}[5]{\pst at getint{#1}\psk at lsystem@order}
-%\define at key[psset]{pst-lsystem}{factor}[2]{\pst at checknum{#1}\psk at lsystem@factor}
-% Size (the smaller, the bigger), no need to be changed, normally
-%\define at key[psset]{pst-lsystem}{size}[4]{\pst at getint{#1}\psk at lsystem@size}
-%\define at key[psset]{pst-lsystem}{type}[0]{\pst at getint{#1}\psk at lsystem@type}
-\psset[pst-lsystem]{order=5,%factor=2,size=4,type=0,
-  usecolor=0}
+\psset[pst-lsystem]{order=5,usecolor=0}
 %
 \def\pslsystem{\def\pst at par{}\pst at object{pslsystem}}
 \def\pslsystem at i{\@ifnextchar(\pslsystem at ii{\pslsystem at ii(0,0)}}%



More information about the tex-live-commits mailing list