From 429dc0fa4f8ccda0a0746211f00ad7d5bdbb6d41 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 26 Nov 2017 23:25:50 +0000 Subject: pst-fractal (26nov17) git-svn-id: svn://tug.org/texlive/trunk@45911 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/pst-fractal/Changes | 4 + Master/texmf-dist/doc/generic/pst-fractal/README | 5 +- .../doc/generic/pst-fractal/pst-fractal-doc.bib | 174 ++++++------ .../doc/generic/pst-fractal/pst-fractal-doc.pdf | Bin 804162 -> 7201737 bytes .../doc/generic/pst-fractal/pst-fractal-doc.tex | 296 ++++++++++++--------- .../texmf-dist/dvips/pst-fractal/pst-fractal.pro | 208 ++++++++++++++- .../tex/generic/pst-fractal/pst-fractal.tex | 129 +++++++-- .../tex/latex/pst-fractal/pst-fractal.sty | 3 +- 8 files changed, 578 insertions(+), 241 deletions(-) diff --git a/Master/texmf-dist/doc/generic/pst-fractal/Changes b/Master/texmf-dist/doc/generic/pst-fractal/Changes index 503e8ee798f..e297cdd6b27 100644 --- a/Master/texmf-dist/doc/generic/pst-fractal/Changes +++ b/Master/texmf-dist/doc/generic/pst-fractal/Changes @@ -1,9 +1,13 @@ pst-fractal.pro -------- +0.04 2017-11-26 add sierpinski curve +0.03 2011-02-10 cometic changes 0.02 2010-02-10 fix bug in tx@fern 0.01 2007-04-05 first CTAN version pst-fractal.tex -------- +0.08 2017-11-26 - add sierpinski curve +0.07 2013-06-17 - allow level 0 for sierpinski 0.06 2010-02-10 - add another type of a Sierpinski triangle 0.05 2007-09-25 - allow unbalanced trees with option 0dvips->ps2pdf. @@ -14,3 +14,6 @@ with pdftex, use the sequence latex->dvips->ps2pdf. To gett he documentation of this document you have to run pst2pdf pst-fractal-doc --Iext=.jpg +%% 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. diff --git a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.bib b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.bib index 8eef82786f7..038d2b36a0a 100644 --- a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.bib +++ b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.bib @@ -1,88 +1,35 @@ -@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } +@STRING{tugboat = {TUGboat} } +@STRING{beiprogramm = {{\TeX}-Beiprogramm} } +@STRING{bretter = {Bretter, die die Welt bedeuten} } +@STRING{dtk = {{D}ie {\TeX}nische {K}om{\"o}die} } +@STRING{editorial = {Editorial} } +@STRING{fremdebuehne = {Von fremden B{\"u}hnen} } +@STRING{fundus = {Aus dem Fundus} } +@STRING{hinterbuehne = {Hinter der B{\"u}hne} } +@STRING{leserbrief = {Leserbrief(e)} } +@STRING{magazin = {Magazin} } +@STRING{rezension = {Rezensionen} } +@STRING{schonimmer = {Was Sie schon immer {\"u}ber {\TeX} wissen wollten \dots} } +@STRING{theaterkasse = {Von der Theaterkasse} } +@STRING{theatertage = {{\TeX}-Theatertage} } -@Book{PostScript, - Author = {Kollock, Nikolai G.}, - Title = {PostScript richtig eingesetzt: vom Konzept zum - praktischen Einsatz}, - Publisher = {IWT}, - Address = {Vaterstetten}, - year = 1989, -} - -@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, -} - - -@Manual{pdftricks, - Title = {PSTricks Support for pdf}, - Author = {Herbert Voss}, - Organization = {}, - Address = {\url{http://PSTricks.de/pdf/pdfoutput.phtml}}, - Note = {}, - year = 2002, -} - -@Manual{miwi, - Title = {References for \TeX{} and Friends}, - Author = {Michael Wiedmann and Peter Karp}, - Organization = {}, - Address = {\url{http://www.miwie.org/tex-refs/}}, - Note = {}, - year = 2003, -} - - -@Manual{vue3d:2002, - Title = {Vue en 3D}, - Author = {Manuel Luque}, - Organization = {}, - Address = {\url{http://members.aol.com/Mluque5130/vue3d16112002.zip}}, - Note = {}, - year = 2002, -} - -@Article{dtk02.2:jackson.voss:plot-funktionen, - author = {Laura E. Jackson and Herbert Vo{\ss}}, - title = {Die {P}lot-{F}unktionen von {\texttt{pst-plot}}}, - journal = dtk, - year = 2002, - volume = {2/02}, - altvolume = 2, - altnumber = 14, - month = jun, - pages = {27--34}, - annote = bretter, - keywords = {}, - abstract = { Im letzten Heft wurden die mathematischen Funktionen von - \PS~im Zusammenhang mit dem {\LaTeX}-Paket - \texttt{pst-plot} zum Zeichnen von Funktionen beschrieben - und durch Beispiele erl{\"a}utert. In diesem Teil werden - die bislang nur erw{\"a}hnten Plot-Funktionen f{\"u}r - externe Daten behandelt. } -} -@Article{dtk02.1:voss:mathematischen, - author = {Herbert Vo{\ss}}, - title = {Die mathematischen {F}unktionen von {P}ostscript}, +@Article{ dtk02.1:voss:mathematischen, + author = {Herbert Voß}, + title = {Die mathematischen {F}unktionen von {P}ost{S}cript}, journal = dtk, year = 2002, volume = {1/02}, altvolume = 1, altnumber = 14, month = mar, - pages = {40-47}, + pages = {}, annote = bretter, keywords = {}, abstract = { \PS, faktisch genauso alt wie {\TeX}, ist im Verh{\"a}ltnis dazu allgemein noch weniger bekannt, wenn es darum geht zu beurteilen, was es denn nun im eigentlichen - Sinne ist. Au{\ss}erdem wird h{\"a}ufig vergessen, dass + Sinne ist. Außerdem wird h{\"a}ufig vergessen, dass sich mit den \PS-Funktionen viele Dinge erledigen lassen, bei denen sonst auf externe Programme zur{\"u}ckgegriffen wird. Dies wird im Folgenden f{\"u}r die mathematischen @@ -91,29 +38,88 @@ } @Book{tlgc2, - 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 = second, + edition = 2, year = {2007}, address = {Reading, Mass.} } +@Article{girou:01:, + author = {Denis Girou}, + title = {Pr\'esentation de {PST}ricks}, + journal = {Cahier {GUT}enberg}, + year = 1994, + volume = {16}, + month = apr, + pages = {21-70} +} + +@Article{girou:02:, + author = {{Timothy van} Zandt and Denis Girou}, + title = {Inside {PST}ricks}, + journal = TUGboat, + year = 1994, + volume = {15}, + month = sep, + pages = {239-246} +} + +@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, +} + +@online{pstricks, + Title = {PSTricks - {\PS} macros for generic {\TeX}}, + Author = {{Timothy van} Zandt}, + Organization = {}, + url = {http://www.tug.org/application/PSTricks}, + year = 1993 +} + @Book{PSTricks2, - author = {Herbert Vo\ss}, + author = {Herbert Voß}, title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX}, - edition = {4.}, + edition = {7}, publisher = {DANTE -- Lehmanns}, - year = {2007}, - address = {Heidelberg/Hamburg} + year = {2016}, + publisher = {Heidelberg and Berlin} } -@Book{voss:math, - author = {Herbert Vo\ss}, - title = {\LaTeX\ in {M}athematik und {N}aturwissenschaften}, - publisher = {{Franzis-Verlag}}, - year = {2006}, - address = {Poing} +@Book{PSTricks2-UIT, + author = {Herbert Voß}, + title = {PSTricks -- Graphics for \TeX\ and \LaTeX}, + publisher = {UIT}, + year = {2011}, + address = {Cambridge} } +@Book{LaTeXRef-UIT, + author = {Herbert Voß}, + title = {{\LaTeX} quick reference}, + publisher = {UIT}, + year = {2012}, + address = {Cambridge} +} + +@online{wolfram, + author = {Eric Weisstein}, + title = {Wolfram MathWorld}, + publisher = {{Wolfram}}, + year = {2007}, + url = {http://mathworld.wolfram.com} +} + +@ctan{pst-tools, + author = {Herbert Voß}, + title = {\texttt{pst-tools} -- Helper functions}, + year = {2012}, + url = {/graphics/pstricks/contrib/pst-tools} +} diff --git a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdf b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdf index 801bcfdb6f8..c9909824bbb 100644 Binary files a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdf and b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdf differ diff --git a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.tex b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.tex index a78d68ada00..8bcd020028c 100644 --- a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.tex @@ -1,12 +1,16 @@ -%% $Id: pst-func-doc.tex 273 2010-01-26 18:28:55Z herbert $ +%% $Id: pst-fractal-doc.tex 658 2017-11-26 16:55:41Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false, smallheadings, headexclude,footexclude,oneside]{pst-doc} \usepackage[utf8]{inputenc} -\usepackage{pst-fractal,pst-exa} +\usepackage{pst-fractal} \let\pstFV\fileversion -\renewcommand\bgImage{\includegraphics[scale=1.5]{images/pst-fractal-doc-tmp-1.pdf}} +\renewcommand\bgImage{\includegraphics[scale=1.5]{images/pst-fractal-doc-tmp-1}} \def\PSLenv{\Lenv{pspicture}} +\usepackage{animate} +%\usepackage{auto-pst-pdf} + +\addbibresource{\jobname.bib} \lstset{language=PSTricks,basicstyle=\footnotesize\ttfamily} % \begin{document} @@ -57,28 +61,97 @@ arguments it is one of the two possible versions: In difference to \Lcs{psfractal} it doesn't reserve any space, this is the reason why it should be part of a \PSLenv{} environment. -\begin{PSTexample}[pos=l] +\begin{LTXexample}[pos=l] \begin{pspicture}(5,5) \psSier(0,0)(2,5)(5,0) \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample}[pos=l] -\begin{pspicture}(5,5) +\begin{LTXexample}[pos=t] +\multido{\iA=1+1}{6}{% +\begin{pspicture}(2,1.7) \psSier[linecolor=blue!70, - fillcolor=red!40](0,0){5cm}{4} + fillcolor=red!40](0,0){2cm}{\iA} +\end{pspicture} } +\end{LTXexample} + + +\section{Sierpinski curve} + +There are four special optional arguments for the Siepinski curve: +\begin{itemize} + \item \texttt{[n=4]} : number of iterations + \item \texttt{[N=all]} : number of placed points (only of interest for an animation) + \item \texttt{[dotcolor=red]} : in difference to linecolor for standard PSTricks + \item \texttt{[showpoints=false]} : show calculated points +\end{itemize} + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-4,-4)(4,4) +\psframe*[linecolor=cyan](-4,-4)(4,4) +\psSier[unit=0.25,n=4,fillstyle=solid,fillcolor=yellow,linecolor=blue] +\psgrid[subgriddiv=0,gridcolor=blue,griddots=5,gridlabels=0pt,unit=0.5](-8,-8)(8,8) +\end{pspicture} +\end{LTXexample} + + +\begin{LTXexample}[pos=t] +\begin{pspicture}[showgrid](-4,-4)(4,4) +\psset{unit=0.25} +% n=4 => Nmax=4^(n+1)=1024 +% ici on marque la moitie des points +\psSier[n=4,N=512] +\end{pspicture} +\end{LTXexample} + + + +\begin{LTXexample}[pos=t] +\begin{pspicture}(-4,-4)(4,4) +\psframe*[linecolor=-yellow](-4,-4)(4,4) +\psSier[n=5,unit=0.125,fillstyle=solid,fillcolor=-cyan,linecolor=-blue] \end{pspicture} -\end{PSTexample} +\end{LTXexample} + + + +\iffalse +\begin{animateinline}[controls,% palindrome, + begin={\begin{pspicture}(-4,-4)(4,4)}, + end={\end{pspicture}}]{5}% 5 image/s +\multiframe{256}{i=1+1}{% + \psframe*[linecolor=yellow!20](-4,-4)(4,4) + \psgrid[subgriddiv=0,gridcolor=blue,griddots=5,gridlabels=0pt,unit=0.5](-8,-8)(8,8) +% n=3 => Nmax=4^(n+1)=256 points + \psSier[linecolor=blue,linewidth=0.05,n=3,showpoints,dotsize=0.1,N=\i,unit=0.5]} +\end{animateinline} + + +\begin{verbatim} +\begin{animateinline}[controls,% palindrome, + begin={\begin{pspicture}(-4,-4)(4,4)}, + end={\end{pspicture}}]{5}% 5 image/s +\multiframe{256}{i=1+1}{% +\psframe*[linecolor=yellow!20](-4,-4)(4,4) +\psgrid[subgriddiv=0,gridcolor=blue,griddots=5,gridlabels=0pt,unit=0.5](-8,-8)(8,8) +% n=3 => Nmax=4^(n+1)=256 points +\psSierpinskyCurve[linecolor=blue,linewidth=0.05,n=3,showpoints,dotsize=0.1,N=\i,unit=0.5]} +\end{animateinline} +\end{verbatim} + +\fi \section{Julia and Mandelbrot sets} The syntax of the \Lcs{psfractal} macro is simple - +% \begin{BDef} \Lcs{psfractal}\OptArgs\coord0\coord1 \end{BDef} + + All Arguments are optional, \Lcs{psfractal} is the same as \Lcs{psfractal}\verb+(-1,-1)(1,1)+. The Julia and Mandelbrot sets are a graphical representation of the following sequence $x$ is the real and $y$ the imaginary part of the complex number $z$. $C(x,y)$ is a complex constant @@ -97,15 +170,17 @@ z_0 &= (x_0;y_0) \end{align} $(x_0;y_0)$ is the starting value. -\begin{PSTexample}[pos=l] -\pspicture(-1,-1)(1,1)\psfractal\endpspicture -\end{PSTexample} +\psset{unit=1cm,opacity=0} + + + +\begin{LTXexample}[pos=l] +\psfractal +\end{LTXexample} -\begin{PSTexample}[pos=l] -\pspicture(-2,-2)(2,2) +\begin{LTXexample}[pos=l] \psfractal[xWidth=4cm,yWidth=4cm, baseColor=white, dIter=20](-2,-2)(2,2) -\endpspicture -\end{PSTexample} +\end{LTXexample} \subsection{Mandelbrot sets} @@ -120,20 +195,16 @@ C(x,y) &= (x_0;y_0) $(x_0;y_0)$ is the starting value. -\begin{PSTexample}[pos=l] -\pspicture(-1,-1)(1,1) +\begin{LTXexample}[pos=l] \psfractal[type=Mandel] -\endpspicture -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample}[pos=l] -\pspicture(-2,-2)(2,2) +\begin{LTXexample}[pos=l] \psfractal[type=Mandel, xWidth=6cm, yWidth=4.8cm, baseColor=white, dIter=10](-2,-1.2)(1,1.2) -\endpspicture -\end{PSTexample} +\end{LTXexample} \subsection{The options} @@ -142,44 +213,36 @@ $(x_0;y_0)$ is the starting value. \Lkeyword{txpe} can be of \Lkeyval{Julia} (default) or \Lkeyval{Mandel}. -\begin{PSTexample}[pos=l] -\pspicture(-1,-1)(3,1) +\begin{LTXexample}[pos=l] \psfractal \psfractal[type=Mandel] -\endpspicture -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{baseColor}} The color for the convergent part is set by \Lkeyword{baseColor}. -\begin{PSTexample} -\begin{postscript} +\begin{LTXexample} \psfractal[xWidth=4cm,yWidth=4cm,dIter=30](-2,-2)(2,2) \psfractal[xWidth=4cm,yWidth=4cm,baseColor=yellow,dIter=30](-2,-2)(2,2) -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{xWidth} and \texttt{yWidth}} \Lkeyword{xWidth} and \Lkeyword{yWidth} define the physical width of the fractal. -\begin{PSTexample} -\begin{postscript} +\begin{LTXexample} \psfractal[type=Mandel,xWidth=12.8cm,yWidth=10.8cm,dIter=5](-2.5,-1.3)(0.7,1.3) -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{cx} and \texttt{cy}}\xLkeyword{cx}\xLkeyword{cy} Define the starting value for the complex constant number $C$. -\begin{PSTexample} -\begin{postscript} +\begin{LTXexample} \psset{xWidth=5cm,yWidth=5cm} \psfractal[dIter=2](-2,-2)(2,2) \psfractal[dIter=2,cx=-1.3,cy=0](-2,-2)(2,2) -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{dIter}} @@ -187,25 +250,21 @@ The color is set by \Index{wavelength} to RGB conversion of the iteration number \Lkeyword{dIter} is the step, predefined by 1. The wavelength is given by the value of \Lps{iter} added by 400. -\begin{PSTexample} -\begin{postscript} +\begin{LTXexample} \psset{xWidth=5cm,yWidth=5cm} \psfractal[dIter=30](-2,-2)(2,2) \psfractal[dIter=10,cx=-1.3,cy=0](-2,-2)(2,2) -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{maxIter}} \Lkeyword{maxIter} is the number of the maximum iteration until it leaves the loop. It is predefined by 255, but internally multiplied by \Lkeyword{dIter}. -\begin{PSTexample} -\begin{postscript} +\begin{LTXexample} \psset{xWidth=5cm,yWidth=5cm} \psfractal[maxIter=50,dIter=3](-2,-2)(2,2) \psfractal[maxIter=30,cx=-1.3,cy=0](-2,-2)(2,2) -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{maxRadius}} If the square of distance of $z_n$ to the origin of the complex coordinate system @@ -213,25 +272,23 @@ is greater as \Lkeyword{maxRadius} then the algorithm leaves the loop and sets the point. \Lkeyword{maxRadius} should always be the square of the "`real"' value, it is preset by 100. -\begin{PSTexample} -\begin{postscript} +\begin{LTXexample} \psset{xWidth=5cm,yWidth=5cm} \psfractal[maxRadius=30,dIter=10](-2,-2)(2,2) \psfractal[maxRadius=30,dIter=30,cx=-1.3,cy=0](-2,-2)(2,2) -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{plotpoints}}\xLkeyword{plotpoints} This option is only valid for the Sierpinski triangle and preset by 2000. -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(5,5) \psSier(0,0)(2.5,5)(5,0) \end{pspicture} \begin{pspicture}(5,5) \psSier[plotpoints=10000](0,0)(2.5,5)(5,0) \end{pspicture} -\end{PSTexample} +\end{LTXexample} @@ -250,63 +307,57 @@ The coordinates of the center are optional, if they are missing, then $(0,0)$ is assumed. -\begin{PSTexample}[pos=l] -\begin{postscript} -\psframebox{\begin{pspicture}(-3,-3)(3,3) +\begin{LTXexample}[pos=l] +\psframebox{% +\begin{pspicture}(-3,-3)(3,3) \psPhyllotaxis \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample}[pos=l] -\begin{postscript} -\psframebox{\begin{pspicture}(-3,-3)(4,4) +\begin{LTXexample}[pos=l] +\psframebox{% +\begin{pspicture}(-3,-3)(4,4) \psPhyllotaxis(1,1) \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{angle}}\xLkeyword{angle} -\begin{PSTexample}[pos=l] -\begin{postscript} -\psframebox{\begin{pspicture}(-2.5,-2.5)(2.5,2.5) +\begin{LTXexample}[pos=l] +\psframebox{% +\begin{pspicture}(-2.5,-2.5)(2.5,2.5) \psPhyllotaxis[angle=99] \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{c}}\xLkeyword{c} This is the length of one element in the unit pt. -\begin{PSTexample} -\begin{postscript} -\psframebox{\begin{pspicture}(8,8) +\begin{LTXexample} +\psframebox{% +\begin{pspicture}(8,8) \psPhyllotaxis[c=7](4,4) \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} -\begin{postscript} -\psframebox{\begin{pspicture}(-3,-3)(3,3) +\begin{LTXexample} +\psframebox{% +\begin{pspicture}(-3,-3)(3,3) \psPhyllotaxis[c=4,angle=111] \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} \subsection{\texttt{maxIter}}\xLkeyword{maxIter} This is the number for the iterations. -\begin{PSTexample} -\begin{postscript} -\psframebox{\begin{pspicture}(-3,-3)(3,3) +\begin{LTXexample} +\psframebox{% +\begin{pspicture}(-3,-3)(3,3) \psPhyllotaxis[c=6,angle=111,maxIter=100] \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} @@ -319,29 +370,26 @@ This is the number for the iterations. The coordinates of the starting point are optional, if they are missing, then $(0,0)$ is assumed. The default \Lkeyword{scale} is set to 10. -\begin{PSTexample} -\begin{postscript} -\psframebox{\begin{pspicture}(-1,0)(1,4) +\begin{LTXexample} +\psframebox{% +\begin{pspicture}(-1,0)(1,4) \psFern \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} -\begin{postscript} -\psframebox{\begin{pspicture}(-1,0)(2,5) +\begin{LTXexample} +\psframebox{% +\begin{pspicture}(-1,0)(2,5) \psFern(1,1) \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} -\begin{postscript} -\psframebox{\begin{pspicture}(-3,0)(3,11) +\begin{LTXexample} +\psframebox{% +\begin{pspicture}(-3,0)(3,11) \psFern[scale=30,maxIter=100000,linecolor=green] \end{pspicture}} -\end{postscript} -\end{PSTexample} +\end{LTXexample} \section{Koch flake} @@ -355,21 +403,21 @@ is assumed. The origin is the lower left point of the flake, marked as red or black point in the following example: -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}[showgrid=true](-2.4,-0.4)(5,5) \psKochflake[scale=10] \psdot[linecolor=red,dotstyle=*](0,0) \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(-0.4,-0.4)(12,4) \psset{fillcolor=lime,fillstyle=solid} \multido{\iA=0+1,\iB=0+2}{6}{% \psKochflake[angle=-30,scale=3,maxIter=\iA](\iB,2.5)\psdot*(\iB,2.5) \psKochflake[scale=3,maxIter=\iA](\iB,0)\psdot*(\iB,0)} \end{pspicture} -\end{PSTexample} +\end{LTXexample} Optional arguments are \Lkeyword{scale}, \Lkeyword{maxIter} (iteration depth) and \Lkeyword{angle} for the first rotation angle. @@ -384,18 +432,18 @@ for the first rotation angle. The coordinates of the starting point are optional, if they are missing, then $(0,0)$ is assumed. The origin is the center of the circle: -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}[showgrid=true](-4,-4)(4,4) \psAppolonius[Radius=4cm] \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(-5,-5)(5,5) \psAppolonius[Radius=5cm,Color] \end{pspicture} -\end{PSTexample} +\end{LTXexample} \section{Trees} @@ -423,33 +471,33 @@ and the depth by \Lkeyword{maxIter}. Valid optional arguments are \end{center} \bigskip -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}[showgrid=true](-3,0)(3,4) \psPTree \psdot*(0,0) \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}[showgrid=true](-6,0)(6,7) \psPTree[xWidth=1.75cm,Color=true] \psdot*[linecolor=white](0,0) \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(-7,-1)(6,8) \psPTree[xWidth=1.75cm,c=0.35] \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(-5,-1)(7,8) \psPTree[xWidth=1.75cm,Color=true,c=0.65] \end{pspicture} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}[showgrid=true](-1,0)(1,3) \psFArrow{0.5} \end{pspicture} @@ -461,10 +509,10 @@ and the depth by \Lkeyword{maxIter}. Valid optional arguments are \begin{pspicture*}[showgrid=true](-3,0)(3,3.5) \psFArrow[linewidth=3pt]{0.65} \end{pspicture*} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(-1,0)(1,3) \psFArrow[Color]{0.5} \end{pspicture} @@ -476,10 +524,10 @@ and the depth by \Lkeyword{maxIter}. Valid optional arguments are \begin{pspicture*}(-3,0)(3,3.5) \psFArrow[Color]{0.65} \end{pspicture*} -\end{PSTexample} +\end{LTXexample} -\begin{PSTexample} +\begin{LTXexample} \begin{pspicture}(-3,-3)(2,3) \psFArrow[Color]{0.6} \psFArrow[angle=90,Color]{0.6} @@ -489,17 +537,15 @@ and the depth by \Lkeyword{maxIter}. Valid optional arguments are \psFArrow[Color]{0.7} \psFArrow[angle=90,Color]{0.7} \end{pspicture*} -\end{PSTexample} +\end{LTXexample} \section{List of all optional arguments for \texttt{pst-fractal}} \xkvview{family=pst-fractal,columns={key,type,default}} \bgroup -\raggedright \nocite{*} -\bibliographystyle{plain} -\bibliography{pst-fractal-doc} +\printbibliography \egroup \printindex diff --git a/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro b/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro index 388447fd20f..5493d734a73 100644 --- a/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro +++ b/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro @@ -1,3 +1,4 @@ +%% $Id: pst-fractal.pro 659 2017-11-26 16:58:16Z herbert $ %% %% This is file `pst-fractal.pro', %% @@ -15,9 +16,9 @@ %% `pst-fractal' is a PSTricks package to draw fractal objects %% %% -%% version 0.02 / 2010-02-10 Herbert Voss +%% version 0.04 / 2017-11-26 Herbert Voss % -/tx@fractalDict 20 dict def +/tx@fractalDict 100 dict def tx@fractalDict begin % /tx@Fractal { @@ -46,7 +47,7 @@ tx@fractalDict begin /MaxXPixel ED /MaxY ED /MaxX ED /MinY ED /MinX ED - /rPixel 0.5 def + /rPixel 1 def /totMaxIter maxIter dIter mul def % /DX MaxX MinX sub def @@ -83,12 +84,12 @@ tx@fractalDict begin } repeat plot{ baseColor x y putPixel - }{ iter 400 add tx@addDict begin - ifCMYK { wavelengthToCMYK Cyan Magenta Yellow Black end setcmykcolor - }{ wavelengthToRGB Red Green Blue end setrgbcolor } ifelse + }{ iter 400 add + ifCMYK { tx@addDict begin wavelengthToCMYK Cyan Magenta Yellow Black end setcmykcolor + }{ tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor } ifelse ifJulia { x y }{ cx cy } ifelse - putPixel stroke - }ifelse % Plot point if point is in set + putPixel stroke + }ifelse % Plot point if point is in set } for } for } def @@ -129,6 +130,76 @@ tx@fractalDict begin } repeat } def % +/append { +% macro de Jean-Paul Vignault +% extraite de pst-solides3d.pro + 3 dict begin + /tab2 exch def + /tab1 exch def + [ tab1 aload pop tab2 aload pop ] + end +} def +% +/Rot-90 { + 2 dict begin + /y exch def /x exch def + y + x neg + end +} def +% +/makeSierVariables { + /Pi [1.5 unit 1 unit + 1 unit 0.5 unit + 1 unit -0.5 unit + 1.5 unit -1 unit + ] def +% + /P0 Pi def + /coefficient 1 def + 3 { + P0 + [ + 0 2 Pi length 2 sub {/i exch def + Pi i get Pi i 1 add get Rot-90 + } for + ] /Pi exch def + P0 Pi append /P0 exch def + } repeat +% +/P1 {[ + 0 2 P0 length 2 sub {/i exch def + P0 i get P0 i 1 add get % Rot-90 + -2 unit coefficient mul add exch + -2 unit coefficient mul add exch + } for +] } def +% +/P2 {[ +0 2 P0 length 2 sub {/i exch def +P0 i get P0 i 1 add get Rot-90 + 2 unit coefficient mul add exch +-2 unit coefficient mul add exch +} for +] }def +% +/P3 {[ +0 2 P0 length 2 sub {/i exch def +P0 i get P0 i 1 add get Rot-90 Rot-90 + 2 unit coefficient mul add exch +2 unit coefficient mul add exch +} for +] } def +% +/P4 {[ + 0 2 P0 length 2 sub {/i exch def + P0 i get P0 i 1 add get Rot-90 Rot-90 Rot-90 + -2 unit coefficient mul add exch + 2 unit coefficient mul add exch + } for +] } def +} def +% /tx@Phyllotaxis { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \pst@tempA % \pst@fractal@c @@ -326,4 +397,125 @@ tx@fractalDict begin pop pop pop pop { count 0 eq { exit } if appol } loop } def % +/tx@Hugo { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%Creator: Hugo M. Ayala'89, MIT +% \pst@fractal@scale +% \pst@tempA +% \pst@fractal@maxIter, which is the depth +% \pst@number\pslinewidth +% { \pst@usecolor\pslinecolor } +/setColor ED +SLW +/depth ED +translate +dup scale +2 setlinecap +setColor +% +/oldarrayx [0 540 72 72] def +/oldarrayy [0 396 720 72] def +% +/scl .1 def +% +realtime srand +/prorand { rand 32768 div 32768 div 1 sub scl mul} def +/findrow {8 mul 7 sub sqrt 1 add 2 div truncate} def +/findindex {dup 1 sub mul 2 div 1 add} def +/findcolumn {dup findrow findindex sub} def +/findnewrow {2 mul 1 sub} def +/findnewcolumn {2 mul} def +/findarraysize {dup 1 add mul 2 div 1 add} def +/findnumoflines {dup 1 sub mul 2 div 3 mul} def +/findnumpoints {dup 1 add mul 2 div} def +/gtol {2 exch exp 1 add} def +/fixangle {dup 180 ge {180 sub} if} def +/backangle {dup 180 ge {180 sub} {180 add} ifelse} def +/splitline { + tpx btx add 2 div /mdx exch def + tpy bty add 2 div /mdy exch def + tpy bty sub tpx btx sub atan + 90 add fixangle + /lineangle exch def + tpy bty sub dup mul + tpx btx sub dup mul + add sqrt /linelen exch def + prorand linelen mul dup + lineangle cos mul mdx add /mdx exch def + lineangle sin mul mdy add /mdy exch def +} def +% +/findnewindex{ cvi /oldindex exch def + oldindex findrow cvi dup /oldrow exch def + findindex oldindex exch sub cvi /oldcolumn exch def + oldrow findnewrow cvi dup /newrow exch def findindex + oldcolumn findnewcolumn cvi dup /newcolumn exch def add + cvi /newindex exch def +} def +% +/drawfractal { + 1 1 generation gtol 1 sub findnumpoints { + cvi /topindex exch def + topindex dup findcolumn exch findrow 1 add findindex add cvi + /leftindex exch def + leftindex 1 add cvi + /rightindex exch def + /tpx oldarrayx topindex get def + /tpy oldarrayy topindex get def + /btx oldarrayx leftindex get def + /bty oldarrayy leftindex get def + /mdx oldarrayx rightindex get def + /mdy oldarrayy rightindex get def + tpx tpy moveto + btx bty lineto + mdx mdy lineto + closepath stroke + } for +} def +% +1 1 depth { + /generation exch def + generation gtol findarraysize cvi dup array /newarrayx exch def + array /newarrayy exch def + 1 1 generation 1 sub gtol findnumpoints { + findnewindex + newarrayx newindex + oldarrayx oldindex get put + newarrayy newindex + oldarrayy oldindex get put + } for + 1 1 generation 1 sub gtol 1 sub findnumpoints { + findnewindex + newcolumn newrow 2 add findindex add cvi dup + /leftindex exch def + 2 add cvi /rightindex exch def + newcolumn newrow 1 add findindex add cvi + /mindex exch def + /tpx newarrayx newindex get def + /tpy newarrayy newindex get def + /btx newarrayx leftindex get def + /bty newarrayy leftindex get def + splitline + newarrayx mindex mdx put + newarrayy mindex mdy put + mindex 1 add cvi /mindex exch def + /btx newarrayx rightindex get def + /bty newarrayy rightindex get def + splitline + newarrayx mindex mdx put + newarrayy mindex mdy put + /mindex leftindex 1 add cvi def + /tpx newarrayx leftindex get def + /tpy newarrayy leftindex get def + splitline + newarrayx mindex mdx put + newarrayy mindex mdy put + } for + /oldarrayx newarrayx def + /oldarrayy newarrayy def + 7 generation sub 5 div setlinewidth +% drawfractal showpage +} for +drawfractal +} def % end of /tx@Hugo +% end diff --git a/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex b/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex index 1fc81444324..2c43333f82d 100644 --- a/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex +++ b/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex @@ -1,3 +1,4 @@ +%% $Id: pst-fractal.tex 659 2017-11-26 16:58:16Z herbert $ %% %% This is file `pst-fractal.tex', %% @@ -21,8 +22,8 @@ \ifx\PSTricksAddLoaded\endinput\else\input pstricks-add.tex\fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi % -\def\fileversion{0.06} -\def\filedate{2010/02/10} +\def\fileversion{0.08} +\def\filedate{2017/11/26} \message{`PST-fractal' v\fileversion, \filedate\space (hv)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -68,6 +69,10 @@ \define@boolkey[psset]{pst-fractal}[Pst@fractal@]{Color}[true]{} \psset[pst-fractal]{Radius=5cm,Color=false} % +\define@key[psset]{pst-fractal}{n}{\def\pst@fractal@n{#1 }} +\define@key[psset]{pst-fractal}{dotcolor}{\pst@getcolor{#1}\psdotcolor} +\define@key[psset]{pst-fractal}{N}{\def\pst@fractal@N{#1}} +\psset[pst-fractal]{n=3,N=all,dotcolor=red} %=========================================================== % \def\psfractal{\pst@object{psfractal}} @@ -75,7 +80,7 @@ \def\psfractal@ii(#1){\@ifnextchar({\psfractal@iii(#1)}{\psfractal@iii(#1)(1,1)}}% \def\psfractal@iii(#1)(#2){% \begin@SpecialObj - \psset{unit=1pt} + \psset{unit=1pt}% \pst@getcoor{#1}\pst@temp@A \pst@getcoor{#2}\pst@temp@B \pspicture(\pst@fractal@xWidth,\pst@fractal@yWidth)% @@ -91,15 +96,17 @@ \pst@fractal@maxRadius { \pst@usecolor\pst@fractal@baseColor } \ifx\pst@fractal@type\pst@fractal@Julia true \else false \fi - \ifPst@CMYK true \else false \fi ^^J% - tx@fractalDict begin tx@Fractal end ^^J% + \ifPst@CMYK true \else false \fi ^^J + tx@fractalDict begin tx@Fractal end ^^J }% end add@pscode - \endpspicture% end box - \end@SpecialObj% + \endpspicture + \end@SpecialObj \ignorespaces} % \def\psSier{\pst@object{psSier}} -\def\psSier@i(#1){\@ifnextchar({\psSier@ii(#1)}{\psSier@iii(#1)}} +\def\psSier@i{\@ifnextchar({\psSier@v}{\psSier@vi}} +% +\def\psSier@v(#1){\@ifnextchar({\psSier@ii(#1)}{\psSier@iii(#1)}} \def\psSier@ii(#1)(#2)(#3){{% \pst@getcoor{#1}\pst@temp@A \pst@getcoor{#2}\pst@temp@B @@ -133,11 +140,72 @@ \pst@tempB\space dup scale 0 setlinewidth 0 0 moveto 1 0 lineto 0.5 0.8660254 lineto 0 setlinewidth closepath - gsave \pst@usecolor\psfillcolor fill grestore stroke - #3 sierpy }% + gsave #3 0 gt { \pst@usecolor\psfillcolor }{ \pst@usecolor\pslinecolor } ifelse + fill grestore stroke + #3 dup 0 gt { sierpy } if }% \end@OpenObj% } % +\def\psSier@vi{% Siepinski curve + \begin@SpecialObj + \addto@pscode{ + /n@ \pst@fractal@n def + /NbrePts (\pst@fractal@N) def + NbrePts (all) eq {/Npts 4 n@ 1 add exp cvi def}{/Npts NbrePts cvi def Npts 4 n@ 1 add exp gt {/Npts 4 n@ 1 add exp cvi def} if } ifelse + /dotcolor {\pst@usecolor\psdotcolor } def + /unit { \pst@number\psunit mul } def + tx@fractalDict begin + makeSierVariables +% + n@ 1 eq {/Sierpinsky P0 def}{ + n@ 1 sub { + /Sierpinsky P1 P2 append P3 append P4 append def +% + /Tab1 [ + 0 2 Sierpinsky length 2 sub {/i exch def + Sierpinsky i 2 getinterval + } for + ] def + /i@ Sierpinsky length 8 div 2.5 mul cvi def % + /Sierpinsky2 [ + Tab1 length { + Tab1 i@ get + /i@ i@ 1 add def + i@ Tab1 length ge {/i@ 0 def} if + }repeat + ] def +% + /P0 [ + 0 1 Sierpinsky2 length 1 sub {/i exch def + Sierpinsky2 i get aload pop + } for + ] def + /coefficient coefficient 2 mul def + } repeat } ifelse +% + newpath + Sierpinsky 0 get Sierpinsky 1 get moveto + 0 2 Sierpinsky length 2 sub {/i exch def + i 2 div Npts ge {exit} if + Sierpinsky i get Sierpinsky i 1 add get lineto + } for + Npts 4 n@ 1 add exp cvi ge {closepath} if + \ifx\psk@fillstyle\relax\else gsave \pst@usecolor\psfillcolor fill grestore\fi + \ifx\pslinestyle\@none\else \psls@solid stroke \fi + \ifshowpoints + 0 2 Sierpinsky length 2 sub {/i exch def + i 2 div Npts ge {exit} if + Sierpinsky i get + Sierpinsky i 1 add get + \psk@dotsize DS + 0 360 arc dotcolor fill + } for + \fi + end + }% + \showpointsfalse + \end@SpecialObj + \ignorespaces} % \def\psPhyllotaxis{\pst@object{psPhyllotaxis}} \def\psPhyllotaxis@i{\@ifnextchar({\psPhyllotaxis@ii}{\psPhyllotaxis@ii(0,0)}} @@ -174,6 +242,23 @@ \end@SpecialObj% }} % +\def\psHugo{\pst@object{psHugo}} +\def\psHugo@i{\@ifnextchar({\psHugo@ii}{\psHugo@ii(0,0)}} +\def\psHugo@ii(#1){{% + \addbefore@par{scale=0.1,linewidth=0.001pt,maxIter=5}% + \pst@getcoor{#1}\pst@tempA% + \begin@SpecialObj% + \addto@pscode{ + \pst@fractal@Xscale + \pst@tempA + \pst@fractal@maxIter + \pst@number\pslinewidth + { \pst@usecolor\pslinecolor } + tx@fractalDict begin tx@Hugo end + }% end add@pscode + \end@SpecialObj% +}} +% \def\psKochflake{\pst@object{psKochflake}} \def\psKochflake@i{\@ifnextchar({\psKochflake@ii}{\psKochflake@ii(0,0)}} \def\psKochflake@ii(#1){{% @@ -184,12 +269,12 @@ gsave ^^J% \pst@tempA translate \pst@usecolor\pslinecolor - \pst@fractal@angle rotate ^^J% - \pst@number\pslinewidth 10 div \pst@fractal@Xscale div SLW ^^J% - \pst@fractal@maxIter ^^J% - tx@fractalDict begin ^^J% - \pst@fractal@scale ^^J% - tx@Kochflake end ^^J% + \pst@fractal@angle rotate ^^J + \pst@number\pslinewidth 10 div \pst@fractal@Xscale div SLW ^^J + \pst@fractal@maxIter ^^J + tx@fractalDict begin ^^J + \pst@fractal@scale ^^J + tx@Kochflake end ^^J }% end add@pscode \psk@fillstyle \addto@pscode{stroke grestore } @@ -206,14 +291,14 @@ \pst@fractal@dIter \pst@number\pst@fractal@Radius \ifPst@fractal@Color true \else false \fi - \ifPst@CMYK true \else false \fi ^^J% - tx@fractalDict begin ^^J% - gsave ^^J% - \pst@tempA translate ^^J% + \ifPst@CMYK true \else false \fi ^^J + tx@fractalDict begin ^^J + gsave ^^J + \pst@tempA translate ^^J \pst@usecolor\pslinecolor \pst@fractal@scale - \pst@number\pslinewidth SLW ^^J% - tx@Appolonius end ^^J% + \pst@number\pslinewidth SLW ^^J + tx@Appolonius end ^^J }% end add@pscode \psk@fillstyle% \addto@pscode{stroke grestore}% diff --git a/Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty b/Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty index 33b263ef54f..24f45c6acaf 100644 --- a/Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty +++ b/Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty @@ -1,10 +1,11 @@ +%% $Id: pst-fractal-doc.tex 658 2017-11-26 16:55:41Z herbert $ \RequirePackage{pstricks} \ProvidesPackage{pst-fractal}[2007/09/25 package wrapper for pst-fractal.tex (hv)] \input{pst-fractal.tex} \IfFileExists{pst-fractal.pro}{% \ProvidesFile{pst-fractal.pro} - [2007/05/14 v. 0.01, PostScript prologue file (hv)] + [2017/11/26 v. 0.04, PostScript prologue file (hv)] \@addtofilelist{pst-fractal.pro}}{}% \ProvidesFile{pst-fractal.tex} [\filedate\space v\fileversion\space `PST-fractal' (hv)] -- cgit v1.2.3