texlive[48762] Master: pst-lsystem (25sep18)
commits+karl at tug.org
commits+karl at tug.org
Tue Sep 25 22:33:21 CEST 2018
Revision: 48762
http://tug.org/svn/texlive?view=revision&revision=48762
Author: karl
Date: 2018-09-25 22:33:21 +0200 (Tue, 25 Sep 2018)
Log Message:
-----------
pst-lsystem (25sep18)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/libexec/ctan2tds
trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/generic/pst-lsystem/
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/dvips/pst-lsystem/
trunk/Master/texmf-dist/dvips/pst-lsystem/pst-lsystem.pro
trunk/Master/texmf-dist/tex/generic/pst-lsystem/
trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex
trunk/Master/texmf-dist/tex/latex/pst-lsystem/
trunk/Master/texmf-dist/tex/latex/pst-lsystem/pst-lsystem.sty
trunk/Master/tlpkg/tlpsrc/pst-lsystem.tlpsrc
Added: trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/Changes 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,10 @@
+..... pst-lsystem.tex
+0.01 2018-09-23 first CTAN version
+
+
+..... pst-lsystem.sty
+0.01 2018-09-23 first CTAN version
+
+
+..... pst-lsystem.pro
+0.01 2018-09-23 first CTAN version
Added: trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,20 @@
+# pst-lsystem: creating images defined by a L-system
+
+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/
+Then do not forget to run texhash to update this tree.
+
+pst-lsystem needs pstricks, which should
+be part of your local TeX installation, otherwise get it from a
+CTAN server, http://mirror.ctan.org
+
+PSTricks is PostScript Tricks, the documentation cannot be run
+with pdftex, use the sequence latex->dvips->ps2pdf or
+pdflatex with package auto-pst-pdf or xelatex.
+
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+
+
+%% $Id: README.md 815 2018-09-25 06:16:11Z herbert $
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-lsystem/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,90 @@
+%% -*-bibtex-*-
+ at STRING{tugboat = {TUGboat} }
+ at STRING{beiprogramm = {{\TeX}-Beiprogramm} }
+ at STRING{bretter = {Bretter, die die Welt bedeuten} }
+ at STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} }
+ at STRING{editorial = {Editorial} }
+ at STRING{fremdebuehne = {Von fremden B{\"u}hnen} }
+ at STRING{fundus = {Aus dem Fundus} }
+ at STRING{hinterbuehne = {Hinter der B{\"u}hne} }
+ at STRING{leserbrief = {Leserbrief(e)} }
+ at STRING{magazin = {Magazin} }
+ at STRING{rezension = {Rezensionen} }
+ at STRING{schonimmer = {Was Sie schon immer {\"u}ber {\TeX} wissen wollten \dots} }
+ at STRING{theaterkasse = {Von der Theaterkasse} }
+ at STRING{theatertage = {{\TeX}-Theatertage} }
+
+
+ at online{wikipedia,
+ author = {family={\WikipediA},family-i=W},
+ sortlabel = {Wikipedia},
+ sortname = {Wikipedia},
+ title = {L-system},
+ date = {2018-09-08},
+ urldate = {2018-09-22},
+ url = {https://en.wikipedia.org/wiki/L-system},
+}
+
+
+ at Book{companion,
+ author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}},
+ title = {The {\LaTeX} {G}raphics {C}ompanion},
+ publisher = {{Addison-Wesley Publishing Company}},
+ edition = 2,
+ year = {2007},
+ address = {Reading, Mass.}
+}
+
+ at Book{PSTricks2,
+ author = {Herbert Vo\ss},
+ title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
+ edition = {4.},
+ publisher = {DANTE -- Lehmanns},
+ year = {2007},
+ address = {Heidelberg/Hamburg}
+}
+
+ at Book{LaTeXRef,
+ author = {Herbert Vo\ss},
+ title = {\LaTeX\ Referenz},
+ edition = {1.},
+ publisher = {DANTE -- Lehmanns},
+ year = {2007},
+ address = {Heidelberg/Hamburg}
+}
+ at Book{PostScript,
+ Author = {Kollock, Nikolai G.},
+ Title = {Post{S}cript richtig eingesetzt: vom {K}onzept zum
+ praktischen {E}insatz},
+ Publisher = {IWT},
+ Address = {Vaterstetten},
+ year = 1989,
+}
+
+ at Manual{pstricks,
+ Title = {PSTricks - {\PS} macros for generic {\TeX}},
+ Author = {{Timothy van} Zandt},
+ Organization = {},
+ Address = {\url{http://www.tug.org/application/PSTricks}},
+ Note = {},
+ 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.
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.bib
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf 2018-09-25 20:32:13 UTC (rev 48761)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf 2018-09-25 20:33:21 UTC (rev 48762)
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,367 @@
+%% $Id: pst-lsystem-doc.tex 815 2018-09-25 06:16:11Z 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}
+\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}}
+
+\addbibresource{\jobname.bib}
+
+
+\lstset{language=PSTricks,
+ morekeywords={pslsystem},basicstyle=\footnotesize\ttfamily,
+ literate=%
+ {Ö}{{\"O}}1
+ {Ä}{{\"A}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1
+ {ü}{{\"u}}1
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {~}{{\textasciitilde}}1
+}
+\begin{document}
+
+\title{\texttt{pst-lsystem}}
+\subtitle{Creating images, based on the Lindenmeyer-system; v.\pstFV}
+\author{Herbert Voß}
+\docauthor{}
+\date{\today}
+\maketitle
+
+\tableofcontents
+
+\begin{abstract}
+\noindent
+\LPack{pst-lsystem} loads by default the following packages: \LPack{pst-xkey}, and, of course \LPack{pstricks}.
+All should be already part of your local \TeX\ installation. If not, or in case
+of having older versions, go to \url{http://www.CTAN.org/} and load the newest version.
+
+
+
+\vfill\noindent
+Thanks to \\
+Michel Charpontier,
+and last but not least
+ \url{http://mathworld.wolfram.com}.
+
+\end{abstract}
+
+
+\clearpage
+
+
+\section{Introduction}
+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.
+L-systems were introduced and developed in 1968 by Aristid Lindenmayer,
+a Hungarian theoretical biologist and botanist at the University of Utrecht.~\cite{wikipedia}
+
+
+\section{Usage}
+There are no optional arguments for the package:
+\begin{verbatim}
+\usepackage{pst-lsystem}
+\end{verbatim}
+
+There is only one command:
+
+\begin{BDef}
+\Lcs{pslsystem}\OptArgs\Largr{x,y}
+\end{BDef}
+
+If the coordinates for the origin are missing, then $(0,0)$ is assumed. The L-System ist
+defined by the three functions $F$, $X$, and $Y$. At least one function must be given.
+
+\subsection{Optional arguments}
+
+The following optional arguments for the macro are possible:
+
+\begin{tabularx}{\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{N} & 5 & Number of the recursive calls\\
+\Lkeyword{Ftype} & 4 & How the F-rule should 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}
+%\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}
+\bottomrule
+\end{tabularx}
+
+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:
+
+\begin{verbatim}
+\ifcase\psk at lsystem@Ftype
+ /F { D } def % type 0
+\or % 1
+ /F { 0 eq { D } if } def
+\or % 2
+ /F { dup 0 eq { D } if } def
+\or % 3
+ /F { pop D } def
+\else % 4
+ /F { dup 0 eq { D }{ 1 sub \psk at lsystem@Fnumber {dup} repeat \psk at lsystem@F } ifelse pop } def
+\fi
+\end{verbatim}
+
+The function D does nothing else than drawing a line in the current direction.
+Its length is given by the optional parameter BaseLength.
+
+\subsection{Color}
+There are four predefined color modes, where mode=0 is no color.
+
+
+\psset{linewidth=0.1pt}
+
+\section{Examples}
+\subsection{Dragon}
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-2,-1.5)(4,6)
+\pslsystem[
+ X=-FX++FY-,
+ Y=+FX--FY+,
+ Ftype=1,
+ Start=X,
+ Angle=45,
+ N=9,
+ BaseLength=2mm](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+\subsection{Hilbert}
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-1,-0.5)(4,4)
+\pslsystem[
+ X=-YF+XFX+FY-,
+ Y=+XF-YFY-FX+,
+ Ftype=3,
+ Start=X,
+ Angle=90](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\subsection{Kochflake}
+
+If the rule for \Lkeyword{Start} has more than one function name, one has to repeat
+the number of iterations, which is \Lkeyword{N}, before every following function, but not
+for the first one. That is done already internally:
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-2,-.5)(5,6)
+\pslsystem[
+ Start=F--NF--NF,% repeat number of iterations N
+ F=F+F--F+F,
+ Angle=60,
+ N=4,
+ BaseLength=2pt,
+ linecolor=red](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\subsection{Plant 1}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-2,-2.3)(4,6)
+\pslsystem[
+ Start=F,
+ F={FF-[-F+F+F]+[+F-F-F]},
+ Angle=22.5,
+ BaseLength=2pt,
+ usecolor=4](0,-2)
+\psdot(0,-2)
+\end{pspicture}
+\end{LTXexample}
+
+
+\clearpage
+
+\subsection{Plant 2}
+
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-3,-2.3)(2,6)
+\pslsystem[
+ Start=X,
+ X={F-[[X]+X]+F[+FX]-X},
+ F=FF,
+ Angle=22.5,
+ N=6,
+ BaseLength=1.25pt,
+ usecolor=3](0,-2)
+\psdot(0,-2)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\subsection{Plant 3}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-2,-2.5)(2,5)
+\psset{xunit=3}
+\pslsystem[
+ Start=F,
+ F={F[+F]F[-F][F]},
+ Angle=20,
+ usecolor=3](0,-2)
+\psdot(0,-2)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\subsection{Plant 4}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-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}
+\end{LTXexample}
+
+
+
+\subsection{Plant 5}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-3,-.5)(3,9)
+\pslsystem[
+ Start=X,
+ X={F[+X][-X]FX},
+ F={FF},
+ Angle=25,
+ N=7,
+ BaseLength=1pt,
+ usecolor=2](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{Plant 6}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-3,-.5)(3,9)
+\pslsystem[
+ Start=X,
+ X={F[+X]F[-X]+X},
+ F={FF},
+ Angle=20,
+ N=7,
+ BaseLength=1pt,
+ usecolor=2](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+\subsection{Plant 7}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-3,-.5)(3,9)
+\pslsystem[
+ Start=F,
+ F={F[+F]F[-F]F},
+ Angle=25,
+ BaseLength=1pt,
+ usecolor=2](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+\subsection{Plant 8}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-4,-.5)(5,9)
+\pslsystem[
+ Start=F,
+ F={F[+F[+F][-F]F][-F[+F][-F]F]F[+F][-F]F},
+ Angle=30,
+ BaseLength=1pt,
+ usecolor=4](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+\subsection{Special case}
+
+\begin{LTXexample}[pos=r]
+\begin{pspicture}[showgrid=true](-2,-0.5)(1,4)
+\pslsystem[
+ Start=X,
+ F=FF,
+ X=F+X-F-X+F,
+ Angle=90,
+ N=6,
+ BaseLength=1pt](0,0)
+\psdot(0,0)
+\end{pspicture}
+\end{LTXexample}
+
+
+
+\clearpage
+\section{List of all optional arguments for \nxLPack{pst-lsystem}}
+
+\xkvview{family=pst-lsystem,columns={key,type,default}}
+
+
+\bgroup
+\raggedright
+\nocite{*}
+\printbibliography
+\egroup
+
+\printindex
+
+
+
+\end{document}
+
+
+
+% F=F+FF-FF-F-F+F+FF-F-F+F+FF+FF-F,
Property changes on: trunk/Master/texmf-dist/doc/generic/pst-lsystem/pst-lsystem-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/dvips/pst-lsystem/pst-lsystem.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-lsystem/pst-lsystem.pro (rev 0)
+++ trunk/Master/texmf-dist/dvips/pst-lsystem/pst-lsystem.pro 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,26 @@
+%% pst-lsystem.pro (c) sep 22, 2018 Herbert Voss
+%% version 0.01 2018/09/22
+%
+% based on the work of Michel Charpentier
+%
+/tx at lsystemDict 6 dict def
+tx at lsystemDict begin
+
+/fast? true def % choice between faster or nicer
+
+/D { Element 0 rlineto } bind def
+
+/B [ % quite dirty, but it works...
+ fast? { {currentpoint stroke moveto} aload pop } if
+ {gsave} aload pop
+ { dup color } aload pop
+] cvx bind def
+
+%/B { currentpoint stroke moveto gsave } bind def
+/E { stroke grestore } bind def
+/- { angle neg rotate } def % rotation to the right
+/+ { angle rotate } def % rotation to the left
+%
+
+end
+
Property changes on: trunk/Master/texmf-dist/dvips/pst-lsystem/pst-lsystem.pro
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,143 @@
+%%
+%% This is file `pst-lsystem.tex',
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Package `pst-lsystem.tex'
+%%
+%% Herbert Voss <herbert -> dante.de>
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN archives
+%% in directory macros/latex/base/lppl.txt.
+%%
+%% DESCRIPTION:
+%% `pst-lsystem' is a PSTricks package for lsystem macros
+%%
+%%
+\csname PSTlsystemLoaded\endcsname
+\let\PSTlsystemLoaded\endinput
+% Requires PSTricks
+\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
+\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex \fi
+%
+\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
+% interface to the `xkeyval' package
+\pst at addfams{pst-lsystem}
+
+\def\fileversion{0.01}
+\def\filedate{2018/09/22}
+\message{`PST-lsystem' v\fileversion, \filedate\space (hv)}
+%
+\pstheader{pst-lsystem.pro}
+%
+\def\pst at lsystem@checkRule#1#2{%
+ \def\pst at tempg{}%
+ \pst at cntm=0
+ \ifx\relax#2\relax\else\pst at lsystem@@checkRule#2;\fi
+ \expandafter\let\csname#1\endcsname\pst at tempg
+ \global\expandafter\edef\csname#1number\endcsname{\the\pst at cntm}%
+}
+\def\pst at lsystem@@checkRule#1#2;{%[A
+ \ifx#1[ \edef\pst at tempg{\pst at tempg\space B}%
+ \else
+ \ifx#1] \edef\pst at tempg{\pst at tempg\space E}%
+ \else
+ \edef\pst at tempg{\pst at tempg\space #1}%
+ \ifcat A#1\global\advance\pst at cntm by 1\fi
+ \fi
+ \fi
+ \ifx\relax#2\relax \else\pst at lsystem@@checkRule#2;\fi
+}
+%
+\define at key[psset]{pst-lsystem}{F}[]{\pst at lsystem@checkRule{psk at lsystem@F}{#1}}
+\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}{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}
+%
+\define at key[psset]{pst-lsystem}{usecolor}[0]{\def\psk at lsystem@color{#1}}
+%
+\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}
+%
+\def\pslsystem{\def\pst at par{}\pst at object{pslsystem}}
+\def\pslsystem at i{\@ifnextchar(\pslsystem at ii{\pslsystem at ii(0,0)}}%
+\def\pslsystem at ii(#1){% #1: origin of starting point
+ \begin at SpecialObj
+ \pst at getcolor{\pslinecolor}\psk at linecolor
+ \pst at getcoor{#1}\pst at tempA
+ \addto at pscode{
+ \pst at tempA\space /yOrig ED /xOrig ED
+ tx at lsystemDict begin
+ /order \psk at lsystem@order\space def
+ /N \psk at lsystem@N def
+ /Ftype \psk at lsystem@Ftype def
+ /angle \psk at lsystem@Angle def
+ /START {\psk at lsystem@Start } bind def
+ /Element { \psk at lsystem@BaseLength } def
+ \ifcase\psk at lsystem@Ftype
+ /F { D } def
+ \or %1
+ /F { 0 eq { D } if } def
+ \or %2
+ /F { dup 0 eq { D } if } def
+ \or %3
+ /F { pop D } def
+ \else %4
+ /F { dup 0 eq { D }{ 1 sub \psk at lsystem@Fnumber {dup} repeat \psk at lsystem@F } ifelse pop } def
+ \fi
+ /X { dup 0 ne { 1 sub \psk at lsystem@Xnumber { dup } repeat \psk at lsystem@X } if pop } def
+ /Y { dup 0 ne { 1 sub \psk at lsystem@Ynumber { dup } repeat \psk at lsystem@Y } if pop } def
+ /START {\psk at lsystem@Start } def
+ 1 setlinejoin
+ 1 setlinecap
+% define a color procedure. Parameter is depth. BW used if no color defined
+ \ifcase\psk at lsystem@color
+ /color { pop \pst at usecolor\psk at linecolor } def
+ \or
+ /color { % random branches
+ pop 3 {rand 100 mod 100 div} repeat setrgbcolor
+ } def
+ \or
+ /color { % random subtrees
+ 2 eq {3 {rand 100 mod 100 div} repeat setrgbcolor} if
+ } def
+ \or
+ /color { % lighter green towards leaves, linear
+ order exch sub order 2 mul div 1 3 div exch .7 exch sethsbcolor
+ } def
+ \or
+ /color { % lighter green towards leaves, exponential
+ neg 1.5 exch exp 2 div 1 3 div exch .7 exch sethsbcolor
+ } def
+ \else
+ /color { pop \pst at usecolor\psk at linecolor } def
+ \fi
+ xOrig yOrig moveto
+ 90 rotate
+ N START
+ end
+ \pst at number\pslinewidth SLW
+ \pst at usecolor\psk at linecolor
+ }%
+ \pst at stroke
+ \end at SpecialObj}
+%
+%
+\catcode`\@=\PstAtCode\relax
+%
+%% END: pst-lsystem.tex
+\endinput
+%
+
Property changes on: trunk/Master/texmf-dist/tex/generic/pst-lsystem/pst-lsystem.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/pst-lsystem/pst-lsystem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-lsystem/pst-lsystem.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/pst-lsystem/pst-lsystem.sty 2018-09-25 20:33:21 UTC (rev 48762)
@@ -0,0 +1,8 @@
+\RequirePackage{pstricks}
+\ProvidesPackage{pst-lsystem}[2009/11/07 package wrapper for
+ pst-lsystem.tex (hv)]
+\input{pst-lsystem.tex}
+\ProvidesFile{pst-lsystem.tex}
+ [\filedate\space v\fileversion\space `PST-lsystem' (hv)]
+\IfFileExists{pst-psm.pro}{\@addtofilelist{pst-lsystem.pro}}{}%
+\endinput
Property changes on: trunk/Master/texmf-dist/tex/latex/pst-lsystem/pst-lsystem.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2018-09-25 20:32:13 UTC (rev 48761)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2018-09-25 20:33:21 UTC (rev 48762)
@@ -534,7 +534,7 @@
pst-fill pst-fit pst-fr3d pst-fractal pst-fun pst-func
pst-gantt pst-geo pst-geometrictools pst-gr3d pst-grad pst-graphicx
pst-infixplot pst-intersect pst-jtree pst-knot pst-labo pst-layout
- pst-lens pst-light3d
+ pst-lens pst-light3d pst-lsystem
pst-magneticfield pst-marble pst-math pst-mirror pst-node
pst-ob3d pst-ode pst-optexp pst-optic
pst-osci pst-ovl
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2018-09-25 20:32:13 UTC (rev 48761)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2018-09-25 20:33:21 UTC (rev 48762)
@@ -962,6 +962,7 @@
'pst-layout', "&MAKEcopy",
'pst-lens', "&MAKEpst",
'pst-light3d', "&MAKEpst",
+ 'pst-lsystem', "&MAKEpst",
'pst-magneticfield', "&MAKEpst",
'pst-marble', "&MAKEpst",
'pst-math', "&MAKEpst",
Modified: trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc 2018-09-25 20:32:13 UTC (rev 48761)
+++ trunk/Master/tlpkg/tlpsrc/collection-pstricks.tlpsrc 2018-09-25 20:33:21 UTC (rev 48762)
@@ -61,6 +61,7 @@
depend pst-layout
depend pst-lens
depend pst-light3d
+depend pst-lsystem
depend pst-magneticfield
depend pst-marble
depend pst-math
Added: trunk/Master/tlpkg/tlpsrc/pst-lsystem.tlpsrc
===================================================================
More information about the tex-live-commits
mailing list