summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-26 17:54:09 +0000
committerKarl Berry <karl@freefriends.org>2007-09-26 17:54:09 +0000
commit8286e8f8443b365625bc4b24a1abc456129738ff (patch)
tree868826acd057768d68c23a794d737fef1486e80a /Master/texmf-dist
parente681b05dbd6ec04a81ce0d7eb73de747c1a3113e (diff)
pst-fractal 0.0.5 (25sep07)
git-svn-id: svn://tug.org/texlive/trunk@5050 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-xMaster/texmf-dist/doc/generic/pst-fractal/Changes9
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/1.pngbin821 -> 6837 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/2.pngbin3439 -> 821 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/3.pngbin1469 -> 3439 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/36.pngbin1699 -> 30796 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/37.pngbin4057 -> 125846 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/38.pngbin8107 -> 1699 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/39.pngbin2705 -> 4057 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/4.pngbin14002 -> 1469 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/40.pngbin9030 -> 8107 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/41.pngbin18617 -> 2705 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/42.pngbin18349 -> 9030 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/43.pngbin54784 -> 18617 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/44.pngbin0 -> 18349 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/45.pngbin0 -> 54784 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/images/5.pngbin6837 -> 14002 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.bib11
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdfbin1021874 -> 1224837 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.tex122
-rw-r--r--Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro329
-rw-r--r--Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex447
-rw-r--r--Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty7
22 files changed, 564 insertions, 361 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/Changes b/Master/texmf-dist/doc/generic/pst-fractal/Changes
index 950b39f641c..262966e76c1 100755
--- a/Master/texmf-dist/doc/generic/pst-fractal/Changes
+++ b/Master/texmf-dist/doc/generic/pst-fractal/Changes
@@ -3,6 +3,9 @@ pst-fractal.sty --------
pst-fractal.tex --------
+0.05 2007-09-25 - allow unbalanced trees with option 0<c<1
+ - use option c for unballanced trees
+ - new option minWidth
0.04 2007-05-16 added the new macros
\psPhyllotaxis
\psFern
@@ -12,3 +15,9 @@ pst-fractal.tex --------
\psFArrow
all with several new options
0.03 2007-04-05 first CTAN version
+
+
+pst-fractal.sty --------
+2007-09-25 add message for pst-fractal.pro
+2007-04-05 first CTAN version
+
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/1.png b/Master/texmf-dist/doc/generic/pst-fractal/images/1.png
index 10bc561dd15..21fb2d78cbc 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/1.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/1.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/2.png b/Master/texmf-dist/doc/generic/pst-fractal/images/2.png
index 09ee953ff62..10bc561dd15 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/2.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/2.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/3.png b/Master/texmf-dist/doc/generic/pst-fractal/images/3.png
index aa274420d4f..09ee953ff62 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/3.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/3.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/36.png b/Master/texmf-dist/doc/generic/pst-fractal/images/36.png
index 2a8e66daabe..4ff656584ea 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/36.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/36.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/37.png b/Master/texmf-dist/doc/generic/pst-fractal/images/37.png
index 766df056681..24c97f736e1 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/37.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/37.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/38.png b/Master/texmf-dist/doc/generic/pst-fractal/images/38.png
index 1304823e494..2a8e66daabe 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/38.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/38.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/39.png b/Master/texmf-dist/doc/generic/pst-fractal/images/39.png
index e68fe33cbe1..766df056681 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/39.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/39.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/4.png b/Master/texmf-dist/doc/generic/pst-fractal/images/4.png
index 6c1a0213435..aa274420d4f 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/4.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/4.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/40.png b/Master/texmf-dist/doc/generic/pst-fractal/images/40.png
index 1f499f9e303..1304823e494 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/40.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/40.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/41.png b/Master/texmf-dist/doc/generic/pst-fractal/images/41.png
index a180e40a97b..e68fe33cbe1 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/41.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/41.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/42.png b/Master/texmf-dist/doc/generic/pst-fractal/images/42.png
index b237a48041b..1f499f9e303 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/42.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/42.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/43.png b/Master/texmf-dist/doc/generic/pst-fractal/images/43.png
index a74adab8101..a180e40a97b 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/43.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/43.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/44.png b/Master/texmf-dist/doc/generic/pst-fractal/images/44.png
new file mode 100644
index 00000000000..b237a48041b
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/44.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/45.png b/Master/texmf-dist/doc/generic/pst-fractal/images/45.png
new file mode 100644
index 00000000000..a74adab8101
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/45.png
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-fractal/images/5.png b/Master/texmf-dist/doc/generic/pst-fractal/images/5.png
index 21fb2d78cbc..6c1a0213435 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/images/5.png
+++ b/Master/texmf-dist/doc/generic/pst-fractal/images/5.png
Binary files differ
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 c8b11d8a899..8eef82786f7 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
@@ -90,17 +90,16 @@
gezeigt. }
}
-
-@Book{companion,
- author = {Michel Goosens and Frank Mittelbach and Alexander
- Samarin},
+@Book{tlgc2,
+ 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}},
- year = {2004},
- edition = {2.},
+ edition = second,
+ year = {2007},
address = {Reading, Mass.}
}
+
@Book{PSTricks2,
author = {Herbert Vo\ss},
title = {\texttt{PSTricks} -- {G}rafik f\"ur \TeX{} und \LaTeX},
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 aa0705dd80f..182cc17deb6 100644
--- a/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-fractal/pst-fractal-doc.pdf
Binary files 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 9103b7a2394..6c27664676d 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
@@ -5,7 +5,7 @@
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{geometry,lmodern}
-\usepackage{xcolor}
+\usepackage{xcolor,array}
%\usepackage{pstricks}
\usepackage{listings}
%\usepackage{pst-pdf}
@@ -48,6 +48,8 @@
captionpos=t,%
xleftmargin=1em,%
}
+\lstdefinestyle{syntax}{backgroundcolor=\color{blue!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt,
+ frame=single}
\usepackage{pst-fractal}
\let\myFV\fileversion
@@ -92,19 +94,40 @@ this package together with the spcecial one \verb+pst-xkey+ for PSTricks. The \v
package is available at \href{ftp://ftp.dante.de/pub/tex/macros/latex/contrib/xkeyval/}{CTAN:/macros/latex/contrib/xkeyval/}.
It is also important that after \verb+pst-fractal+ no package is loaded, which uses the old keyval interface.
-The fractals are really big, which is the reason why this document is about 15 MByte.
+The fractals are really big, which is the reason why this document is about 15 MByte
+when you run it without using the external png-images.
\vspace*{2cm}
\end{abstract}%
\tableofcontents
+\section{Sierpinski triangle}
+
+The triangle must be given by three mandatory arguments:
+
+\begin{lstlisting}[style=syntax]
+\psSier[settings](x0,y0)(x1,y1)(x2,y2)
+\end{lstlisting}
+
+In difference to \verb|psfractal| it doesn't reserve any space, this is the
+reason why it should be part of a \verb|pspicture| environment.
+
+\img{1}
+\begin{lstlisting}
+\begin{pspicture}(5,5)
+ \psSier(0,0)(2,5)(5,0)
+\end{pspicture}
+\end{lstlisting}
+
+
+
\section{Julia and Mandelbrot sets}
The syntax of the \verb+psfractal+ macro is simple
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\psfractal[settings](x0,y0)(x1,y1)
-\end{verbatim}
+\end{lstlisting}
All Arguments are optional, \verb+psfractal+ is the same as \verb+\psfractal(-1,-1)(1,1)+.
The Julia and Mandelbrot sets are a graphical representation of the following sequence
@@ -126,12 +149,12 @@ z_0 &= (x_0;y_0)
$(x_0;y_0)$ is the starting value.
-\img{1}
+\img{2}
\begin{lstlisting}
\psfractal
\end{lstlisting}
-\img{2}
+\img{3}
\begin{lstlisting}
\psfractal[xWidth=4cm,yWidth=4cm, baseColor=white, dIter=20](-2,-2)(2,2)
\end{lstlisting}
@@ -149,36 +172,18 @@ C(x,y) &= (x_0;y_0)
$(x_0;y_0)$ is the starting value.
-\img{3}
-\begin{lstlisting}
-\psfractal[type=Mandel]
-\end{lstlisting}
-
-
\img{4}
\begin{lstlisting}
-\psfractal[type=Mandel, xWidth=6cm, yWidth=4.8cm, baseColor=white, dIter=10](-2,-1.2)(1,1.2)
+\psfractal[type=Mandel]
\end{lstlisting}
-\subsection{Sierpinski triangle}
-
-The triangle must be given by three mandatory arguments:
-
-\begin{verbatim}
-\psSier[settings](x0,y0)(x1,y1)(x2,y2)
-\end{verbatim}
-
-In difference to \verb|psfractal| it doesn't reserve any space, this is the
-reason why it should be part of a \verb|pspicture| environment.
\img{5}
\begin{lstlisting}
-\begin{pspicture}(5,5)
- \psSier(0,0)(2,5)(5,0)
-\end{pspicture}
+\psfractal[type=Mandel, xWidth=6cm, yWidth=4.8cm, baseColor=white, dIter=10](-2,-1.2)(1,1.2)
\end{lstlisting}
-\section{The options}
+\subsection{The options}
\subsection{\texttt{type}}
@@ -268,6 +273,7 @@ This option is only valid for the Sierpinski triangle and preset by 2000.
\end{lstlisting}
+
\section{Phyllotaxis}
The beautiful arrangement of leaves in some plants, called phyllotaxis,
obeys a number of subtle mathematical relationships. For instance, the florets
@@ -275,9 +281,9 @@ in the head of a sunflower form two oppositely directed spirals: 55 of them cloc
and 34 counterclockwise. Surprisingly, these numbers are consecutive Fibonacci numbers.
The Phyllotaxis is like a Lindenmayer system.
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\psPhyllotaxis[settings](x,y)
-\end{verbatim}
+\end{lstlisting}
The coordinates of the center are optional, if they are missing, then $(0,0)$
is assumed.
@@ -338,9 +344,9 @@ This is the number for the iterations.
\section{Fern}
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\psFern[settings](x,y)
-\end{verbatim}
+\end{lstlisting}
The coordinates of the starting point are optional, if they are missing, then $(0,0)$
is assumed.
@@ -369,9 +375,9 @@ is assumed.
\section{Koch flake}
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\psKochflake[settings](x,y)
-\end{verbatim}
+\end{lstlisting}
The coordinates of the starting point are optional, if they are missing, then $(0,0)$
is assumed. The origin is the lower left point of the flake, marked as red
@@ -403,9 +409,9 @@ for the first rotation angle.
\section{Apollonius circles}
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\psAppolonius[settings](x,y)
-\end{verbatim}
+\end{lstlisting}
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:
@@ -428,17 +434,29 @@ is assumed. The origin is the center of the circle:
\section{Trees}
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\psPTree[settings](x,y)
\psFArrow[settings](x,y){fraction}
-\end{verbatim}
+\end{lstlisting}
The coordinates of the starting point are optional, if they are missing, then $(0,0)$
is assumed. The origin is the center of the lower line, shown in the following examples
by the dot. Special parameters are the width of the lower basic line for the tree and the
height and angle for the arrow and for both the color option. The color step is given by \verb+dIter+
-and the depth by \verb+maxIter+.
-
+and the depth by \verb+maxIter+. Valid optional arguments are
+
+\medskip
+\begin{center}
+\begin{tabular}{@{}>{\ttfamily}lll@{}}
+\emph{Name} & \emph{Meaning} & \emph{default}\\\hline
+xWidth & first base width & 1cm\\
+minWidth & last base width & 1pt\\
+c & factor for unbalanced trees (0<c<1) & 0.5\\
+Color & colored tree & fasle
+\end{tabular}
+\end{center}
+
+\bigskip
\img{34}
\begin{lstlisting}
\begin{pspicture}[showgrid=true](-3,0)(3,4)
@@ -457,7 +475,23 @@ and the depth by \verb+maxIter+.
\end{lstlisting}
-\img[36][37]{38}
+\img{36}
+\begin{lstlisting}
+\begin{pspicture}(-7,-1)(6,8)
+ \psPTree[xWidth=1.75cm,c=0.35]
+\end{pspicture}
+\end{lstlisting}
+
+\img{37}
+\begin{lstlisting}
+\begin{pspicture}(-5,-1)(7,8)
+ \psPTree[xWidth=1.75cm,Color=true,c=0.65]
+\end{pspicture}
+\end{lstlisting}
+
+
+
+\img[38][39]{40}
\begin{lstlisting}
\begin{pspicture}[showgrid=true](-1,0)(1,3)
\psFArrow{0.5}
@@ -473,7 +507,7 @@ and the depth by \verb+maxIter+.
\end{lstlisting}
-\img[39][40]{41}
+\img[41][42]{43}
\begin{lstlisting}
\begin{pspicture}(-1,0)(1,3)
\psFArrow[Color]{0.5}
@@ -489,7 +523,7 @@ and the depth by \verb+maxIter+.
\end{lstlisting}
-\img[0][42]{43}
+\img[0][44]{45}
\begin{lstlisting}
\begin{pspicture}(-3,-3)(2,3)
\psFArrow[Color]{0.6}
@@ -526,10 +560,10 @@ kdvi but not xdvi. It is better to run \verb|dvips| and then view the ps-file wi
\item Unknown PostScript command:
Be sure that you have the ''newest`` \verb|pstricks-add.tex| file
-\begin{verbatim}
+\begin{lstlisting}[style=syntax]
\def\fileversion{2.85}
\def\filedate{2007/04/01}
-\end{verbatim}
+\end{lstlisting}
\end{itemize}
diff --git a/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro b/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro
new file mode 100644
index 00000000000..041b7122890
--- /dev/null
+++ b/Master/texmf-dist/dvips/pst-fractal/pst-fractal.pro
@@ -0,0 +1,329 @@
+%%
+%% This is file `pst-fractal.pro',
+%%
+%% IMPORTANT NOTICE:
+%%
+%% Package `pst-fractal'
+%%
+%% Herbert Voss <voss _at_ PSTricks.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-fractal' is a PSTricks package to draw fractal objects
+%%
+%%
+%% version 0.01 / 2007-05-14 Herbert Voss <voss _at_ PSTricks.de>
+%
+/tx@fractalDict 20 dict def
+tx@fractalDict begin
+%
+/tx@Fractal {
+% \pst@temp@A
+% \pst@temp@B
+% \pst@number\pst@fractal@xWidth
+% \pst@number\pst@fractal@yWidth
+% \pst@fractal@cx
+% \pst@fractal@cy
+% \pst@fractal@maxIter
+% \pst@fractal@dIter
+% \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
+% tx@fractalDict begin tx@Fractal end
+ /ifCMYK ED
+ /ifJulia ED
+ /baseColor ED
+ /maxRadius ED
+ /dIter ED
+ /maxIter ED
+ /cy ED
+ /cx ED
+ /MaxYPixel ED
+ /MaxXPixel ED
+ /MaxY ED /MaxX ED
+ /MinY ED /MinX ED
+ /rPixel 0.5 def
+ /totMaxIter maxIter dIter mul def
+%
+ /DX MaxX MinX sub def
+ /DY MaxY MinY sub def
+ /dx DX MaxXPixel div def /dy DY MaxYPixel div def
+%
+ /convertX { MinX sub DX sub dx div } def % user -> pt
+ /convertY { MinY sub dy div } def % user -> pt
+ /convertXY { convertY exch convertX exch } def
+%
+ /putPixel {% x y auf dem Stack in Benutzerkoordinaten
+ convertXY
+ rPixel 0 360 arc fill
+ } def
+%
+ MinX dx MaxX {
+ ifJulia { /x exch def }{ /cx exch def /x 0.0 def } ifelse
+ MinY dy MaxY {
+ ifJulia { /y exch def }{ /cy exch def /y 0.0 def } ifelse
+ /iter 0 def
+ /zx x def
+ /zy y def
+ /plot true def
+ totMaxIter cvi {
+ zx dup mul zy dup mul add maxRadius gt {
+ /plot false def
+ exit
+ }{% Calculate next value
+ 2 zx zy mul mul cy add
+ /zx zx dup mul zy dup mul sub cx add def
+ /zy exch def
+ /iter iter dIter add def
+ } ifelse
+ } 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
+ ifJulia { x y }{ cx cy } ifelse
+ putPixel stroke
+ }ifelse % Plot point if point is in set
+ } for
+ } for
+} def
+%
+/tx@Sierpinski { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pst@temp@A
+% \pst@temp@B
+% \pst@temp@C
+% { \pst@usecolor\pslinecolor }
+% \pst@fractal@plotpoints
+ /plotpoints ED
+ /setColor ED
+ /Coor ED
+ /Sx 0 def /Sy 0 def
+ /putPixel { 0.5 0 360 arc stroke } def % x y on stack
+ /newPosition { % point # on stack
+ Coor exch 2 getinterval aload pop
+ /y exch def /x exch def
+ x Sx sub 2 div Sx add /Sx exch def
+ y Sy sub 2 div Sy add /Sy exch def
+ Sx Sy putPixel
+ } def
+ /drawFrame {
+ Coor aload pop
+ newpath
+ moveto
+ nCoor 1 sub { lineto } repeat % n-1 times
+ gsave 0.9 setgray fill grestore
+ setColor
+ closepath
+ stroke
+ } def
+ /nCoor Coor length 2 div 0.5 add cvi def % # of dots
+ drawFrame
+ plotpoints cvi {
+ rand nCoor mod
+ dup add newPosition
+ } repeat
+} def
+%
+/tx@Phyllotaxis { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pst@tempA
+% \pst@fractal@c
+% \pst@fractal@angle
+% \pst@fractal@maxIter CMYK
+ /ifCMYK ED
+ /maxIter ED
+ /fractalAngle ED
+ /c ED
+ translate
+ /angle fractalAngle dup 0 eq { pop 360 5 sqrt 1 add 2 div dup mul div } if def
+ maxIter cvi -1 0 {
+ angle rotate
+ 0 0 moveto
+ dup sqrt c mul c lineto
+ c c neg rlineto
+ c neg dup rlineto
+ closepath
+ gsave
+ 1 exch maxIter cvi div 90 mul cos 0
+ ifCMYK { tx@addDict begin RGBtoCMYK end setcmykcolor }{ setrgbcolor } ifelse
+ fill
+ grestore
+ stroke
+ } for
+} def
+%
+/tx@Fern { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pst@tempA
+% \pst@fractal@scale
+% \pst@fractal@maxIter
+% \pst@fractal@radius
+% \pst@number\pslinewidth
+% { \pst@usecolor\pslinecolor }
+ /setColor ED
+ SLW
+ /radius ED
+ /maxIter ED
+ 10 10 scale
+ translate
+ /m1 [ 0.00 0.00 0.00 0.16 0.00 0.00 ] def
+ /m2 [ 0.85 -0.04 0.04 0.85 0.00 1.60 ] def
+ /m3 [ 0.20 0.23 -0.26 0.22 0.00 1.60 ] def
+ /m4 [ -0.15 0.26 0.28 0.24 0.00 0.44 ] def
+ 1 setlinecap
+ setColor
+ 0 0 % start point
+ maxIter cvi {
+ % get a transformation matrix probabilistically
+ /r rand 100 mod def
+ r 1 lt { /m m1 def }{ r 86 lt
+ { /m m2 def }{ r 93 lt {
+ /m m3 def }{ /m m4 def } ifelse } ifelse } ifelse
+ % Make a linear transformation, then
+ % plot a point at current location
+ m transform 2 copy radius 0 360 arc
+ stroke
+ } repeat
+} def
+%
+/tx@Kochflake { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pst@tempA
+% { \pst@usecolor\pslinecolor }
+% \pst@fractal@scale
+% \pst@fractal@angle
+% CLW
+% \pst@fractal@maxIter
+ /maxIter ED
+ 10 10 scale
+ 45 rotate
+ /side {
+ dup 0 gt {
+ 1 sub 1 3 div dup scale side 60 rotate side
+ -120 rotate side 60 rotate side 3 dup scale 1 add
+ }{ 1 1 rlineto 1 1 translate } ifelse
+ } def
+ /star {
+ dup currentlinewidth 1 1
+ 4 -1 roll { pop 3 div } for
+ setlinewidth
+ 0 0 moveto
+ side -120 rotate side -120 rotate side
+ pop
+ closepath
+ } def
+ maxIter star
+} def
+%
+/tx@Appolonius { %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \pst@fractal@dIter
+% \pst@number\pst@fractal@Radius
+% \ifPst@fractal@Color true \else false \fi
+% \ifPst@CMYK true \else false \fi
+% gsave
+% \pst@tempA translate
+% \pst@usecolor\pslinecolor
+% \pst@fractal@scale
+% \pst@number\pslinewidth SLW
+%
+ /ifCMYK ED
+ /ifColor ED
+ /Radius ED
+ /dIter ED
+ /icount 380 def
+ /setWaveColor {
+ /icount icount dup 780 gt { pop 380 }{ dIter add } ifelse def
+ tx@addDict begin icount
+ ifCMYK { wavelengthToCMYK Cyan Magenta Yellow Black end setcmykcolor
+ }{ wavelengthToRGB Red Green Blue end setrgbcolor } ifelse
+ } def
+ /collect { [ 4 1 roll ] } def
+ /nget { exch dup 3 1 roll exch get } def
+ /polydup { 1 add [ exch 1 roll ] aload aload pop } def
+ /circle { aload pop newpath 0 360 arc closepath
+ ifColor { gsave setWaveColor fill grestore } if
+ stroke } def
+ /inverse {
+ aload 4 1 roll 3 1 roll dup mul exch dup mul add exch dup mul sub
+ dup 0 eq not {1 exch div} if
+ exch
+ aload pop
+ 4 -1 roll dup 5 1 roll mul 3 1 roll
+ 4 -1 roll dup 5 1 roll mul 3 1 roll
+ 4 -1 roll dup 5 1 roll mul 3 1 roll
+ 4 -1 roll pop
+ dup 0 lt {neg} if
+ collect
+ } def
+ /between {
+ collect
+ 0 nget 2 get exch 1 nget 2 get exch 3 1 roll
+ lt {aload pop 3 1 roll exch 3 -1 roll collect} if
+ 0 nget 2 get exch 2 nget 2 get exch 3 1 roll
+ lt {aload pop 3 -1 roll exch 3 1 roll collect} if
+ 1 nget 0 get exch 2 nget 2 get exch
+ 2 nget 0 get exch 1 nget 2 get exch
+ 1 nget 2 get exch 2 nget 2 get exch
+ 7 1 roll add 5 1 roll mul 3 1 roll mul add exch div
+ /xdisp exch def
+ 1 nget 1 get exch 2 nget 2 get exch
+ 2 nget 1 get exch 1 nget 2 get exch
+ 1 nget 2 get exch 2 nget 2 get exch
+ 7 1 roll add 5 1 roll mul 3 1 roll mul add exch div
+ /ydisp exch def
+ 0 nget aload pop 3 1 roll ydisp sub 3 1 roll xdisp sub 3 1 roll
+ collect
+ inverse dup
+ /first exch def
+ /second exch def
+ 1 nget 1 get exch 2 nget 1 get exch 3 1 roll sub /xvect exch def
+ 2 nget 0 get exch 1 nget 0 get exch 3 1 roll sub /yvect exch def
+ xvect dup mul yvect dup mul add sqrt
+ dup 0.0 eq not { first 2 get 2 mul exch div} if
+ dup xvect mul /xvect exch def
+ yvect mul /yvect exch def
+ first aload pop 3 1 roll yvect add 3 1 roll xvect add 3 1 roll
+ collect
+ inverse /first exch def
+ second aload pop 3 1 roll yvect sub 3 1 roll xvect sub 3 1 roll
+ collect
+ inverse /second exch def
+ first second
+ first 2 get second 2 get sub
+ 0 gt { exch } if
+ pop
+ aload pop
+ 3 1 roll ydisp add 3 1 roll xdisp add 3 1 roll collect
+ exch pop
+ } def
+ /appol {
+ aload pop 3 polydup between
+ dup circle
+ 2 nget CLW gt { 1 1 3 { pop 3 polydup collect 5 1 roll 4 -1 roll } for } if
+ pop pop pop pop
+ } def
+ /inside {
+ /temp exch def
+ 0 120 240 {
+ /angle exch def
+ temp aload pop
+ 3 sqrt 2 div 1 add div
+ /radius exch def
+ angle sin radius mul
+ angle cos radius mul
+ exch 4 -1 roll add
+ 3 1 roll add
+ radius 3 sqrt 2 div mul
+ collect
+ } for
+ } def
+%
+ [ 0 0 Radius ] dup inside 4 polydup
+ 1 1 4 { pop circle } for
+ 1 1 4 { pop 3 polydup collect 5 1 roll 4 1 roll } for
+ pop pop pop pop { count 0 eq { exit } if appol } loop
+} def
+%
+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 c7bfe3ded75..fa6df4f3d4f 100644
--- a/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex
+++ b/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex
@@ -21,13 +21,14 @@
\ifx\PSTricksAddLoaded\endinput\else\input pstricks-add.tex\fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
%
-\def\fileversion{0.04}
-\def\filedate{2007/05/15}
+\def\fileversion{0.05}
+\def\filedate{2007/09/24}
\message{`PST-fractal' v\fileversion, \filedate\space (hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\pst@addfams{pst-fractal}
\pstheader{pstricks-add.pro}
+\pstheader{pst-fractal.pro}
%\SpecialCoor
%
\newdimen\pst@fractal@xWidth
@@ -53,7 +54,9 @@
%
\define@key[psset]{pst-fractal}{angle}{\pst@getangle{#1}\pst@fractal@angle}
\define@key[psset]{pst-fractal}{c}{\pst@checknum{#1}\pst@fractal@c}
-\psset[pst-fractal]{angle=0,c=5}
+\newdimen\pst@fractal@minWidth
+\define@key[psset]{pst-fractal}{minWidth}{\pssetlength\pst@fractal@minWidth{#1}}
+\psset[pst-fractal]{angle=0,c=5,minWidth=1pt}
%
\define@key[psset]{pst-fractal}{scale}{\pst@getscale{#1}\pst@fractal@scale%
\let\pst@fractal@Xscale\pst@tempg}
@@ -78,57 +81,19 @@
\pst@getcoor{#2}\pst@temp@B
\pspicture(\pst@fractal@xWidth,\pst@fractal@yWidth)%
\addto@pscode{
- \pst@temp@A /MinY ED /MinX ED
- \pst@temp@B /MaxY ED /MaxX ED
- /MaxXPixel \pst@number\pst@fractal@xWidth def
- /MaxYPixel \pst@number\pst@fractal@yWidth def
- /rPixel 0.5 def
- /cx \pst@fractal@cx def
- /cy \pst@fractal@cy def
- /totMaxIter \pst@fractal@maxIter\space \pst@fractal@dIter\space mul def
-%
- /DX MaxX MinX sub def
- /DY MaxY MinY sub def
- /dx DX MaxXPixel div def /dy DY MaxYPixel div def
-%
- /convertX { MinX sub DX sub dx div } def % user -> pt
- /convertY { MinY sub dy div } def % user -> pt
- /convertXY { convertY exch convertX exch } def
-%
- /putPixel {% x y auf dem Stack in Benutzerkoordinaten
- convertXY
- rPixel 0 360 arc fill
- } def
-%
- MinX dx MaxX {
- \ifx\pst@fractal@type\pst@fractal@Julia /x exch def \else /cx exch def /x 0.0 def \fi
- MinY dy MaxY {
- \ifx\pst@fractal@type\pst@fractal@Julia /y exch def \else /cy exch def /y 0.0 def \fi
- /iter 0 def
- /zx x def
- /zy y def
- /plot true def
- totMaxIter cvi {
- zx dup mul zy dup mul add \pst@fractal@maxRadius\space gt {
- /plot false def
- exit
- }{% Calculate next value
- 2 zx zy mul mul cy add
- /zx zx dup mul zy dup mul sub cx add def
- /zy exch def
- /iter iter \pst@fractal@dIter add def
- } ifelse
- } repeat
- plot{
- \pst@usecolor\pst@fractal@baseColor
- x y putPixel
- }{ iter 400 add tx@addDict begin wavelengthToRGB
- Red Green Blue setrgbcolor end
- \ifx\pst@fractal@type\pst@fractal@Julia x y \else cx cy \fi
- putPixel stroke
- }ifelse % Plot point if point is in set
- } for
- } for
+ \pst@temp@A
+ \pst@temp@B
+ \pst@number\pst@fractal@xWidth
+ \pst@number\pst@fractal@yWidth
+ \pst@fractal@cx
+ \pst@fractal@cy
+ \pst@fractal@maxIter
+ \pst@fractal@dIter
+ \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%
}% end add@pscode
\endpspicture% end box
\end@SpecialObj%
@@ -141,34 +106,10 @@
\pst@getcoor{#3}\pst@temp@C
\begin@SpecialObj%
\addto@pscode{
- /Coor [ \pst@temp@A
- \pst@temp@B
- \pst@temp@C ] def
- /Sx 0 def /Sy 0 def
- /putPixel { 0.5 0 360 arc stroke } def % x y on stack
- /newPosition { % point # on stack
- Coor exch 2 getinterval aload pop
- /y exch def /x exch def
- x Sx sub 2 div Sx add /Sx exch def
- y Sy sub 2 div Sy add /Sy exch def
- Sx Sy putPixel
- } def
- /drawFrame {
- Coor aload pop
- newpath
- moveto
- nCoor 1 sub { lineto } repeat % n-1 times
- gsave 0.9 setgray fill grestore
- \pst@usecolor\pslinecolor
- closepath
- stroke
- } def
- /nCoor Coor length 2 div 0.5 add cvi def % # of dots
- drawFrame
- \pst@fractal@plotpoints\space cvi {
- rand nCoor mod
- dup add newPosition
- } repeat
+ [ \pst@temp@A \pst@temp@B \pst@temp@C ] ^^J%
+ { \pst@usecolor\pslinecolor } ^^J%
+ \pst@fractal@plotpoints ^^J%
+ tx@fractalDict begin tx@Sierpinski end ^^J%
}% end add@pscode
\end@SpecialObj%
}}
@@ -179,22 +120,12 @@
\pst@getcoor{#1}\pst@tempA
\begin@SpecialObj%
\addto@pscode{
- /c \pst@fractal@c def
- /angle \pst@fractal@angle dup 0 eq { pop 360 5 sqrt 1 add 2 div dup mul div } if def
- \pst@tempA translate
- \pst@fractal@maxIter cvi -1 0 {
- angle rotate
- 0 0 moveto
- dup sqrt c mul c lineto
- c c neg rlineto
- c neg dup rlineto
- closepath
- gsave
- 1 exch \pst@fractal@maxIter cvi div 90 mul cos 0 setrgbcolor
- fill
- grestore
- stroke
- } for
+ \pst@tempA
+ \pst@fractal@c
+ \pst@fractal@angle
+ \pst@fractal@maxIter
+ \ifPst@CMYK true \else false \fi ^^J%
+ tx@fractalDict begin tx@Phyllotaxis end ^^J%
}% end add@pscode
\end@SpecialObj%
}}
@@ -207,27 +138,13 @@
\pst@getcoor{#1}\pst@tempA%
\begin@SpecialObj%
\addto@pscode{
- \pst@tempA translate
- /m1 [ 0.00 0.00 0.00 0.16 0.00 0.00 ] def
- /m2 [ 0.85 -0.04 0.04 0.85 0.00 1.60 ] def
- /m3 [ 0.20 0.23 -0.26 0.22 0.00 1.60 ] def
- /m4 [ -0.15 0.26 0.28 0.24 0.00 0.44 ] def
- 10 10 scale \pst@fractal@scale
- 1 setlinecap
- \pst@number\pslinewidth SLW
- \pst@usecolor\pslinecolor
- 0 0 % start point
- \pst@fractal@maxIter cvi {
- % get a transformation matrix probabilistically
- /r rand 100 mod def
- r 1 lt { /m m1 def }{ r 86 lt
- { /m m2 def }{ r 93 lt {
- /m m3 def }{ /m m4 def } ifelse } ifelse } ifelse
- % Make a linear transformation, then
- % plot a point at current location
- m transform 2 copy \pst@fractal@radius 0 360 arc
- stroke
- } repeat
+ \pst@tempA
+ \pst@fractal@maxIter
+ \pst@fractal@radius
+ \pst@number\pslinewidth
+ { \pst@usecolor\pslinecolor }
+ \pst@fractal@scale ^^J%
+ tx@fractalDict begin tx@Fern end ^^J%
}% end add@pscode
\end@SpecialObj%
}}
@@ -239,32 +156,18 @@
\pst@getcoor{#1}\pst@tempA%
\begin@SpecialObj%
\addto@pscode{
- gsave
- \pst@tempA translate
- \pst@usecolor\pslinecolor
- 10 10 scale \pst@fractal@scale
- \pst@number\pslinewidth 10 div \pst@fractal@Xscale div SLW
- 45 rotate
- \pst@fractal@angle rotate
- /side {
- dup 0 gt {
- 1 sub 1 3 div dup scale side 60 rotate side
- -120 rotate side 60 rotate side 3 dup scale 1 add
- }{ 1 1 rlineto 1 1 translate } ifelse
- } def
- /star {
- dup currentlinewidth 1 1
- 4 -1 roll { pop 3 div } for
- setlinewidth
- 0 0 moveto
- side -120 rotate side -120 rotate side
- pop
- closepath
- } def
- \pst@fractal@maxIter star
+ 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%
}% end add@pscode
\psk@fillstyle
- \addto@pscode{stroke}
+ \addto@pscode{stroke grestore }
\end@SpecialObj%
}}
%
@@ -275,152 +178,79 @@
\pst@getcoor{#1}\pst@tempA%
\begin@SpecialObj%
\addto@pscode{
- /icount 380 def
- /setWaveColor {
- /icount icount dup 780 gt { pop 380 }{ \pst@fractal@dIter add } ifelse def
- tx@addDict begin icount wavelengthToRGB
- Red Green Blue end setrgbcolor
- } def
- gsave
- \pst@tempA translate
- \pst@usecolor\pslinecolor
- \pst@fractal@scale
- /collect { [ 4 1 roll ] } def
- /nget { exch dup 3 1 roll exch get } def
- /polydup { 1 add [ exch 1 roll ] aload aload pop } def
- /circle { aload pop newpath 0 360 arc closepath
- \ifPst@fractal@Color
- gsave setWaveColor fill grestore \fi
- stroke } def
- /inverse {
- aload 4 1 roll 3 1 roll dup mul exch dup mul add exch dup mul sub
- dup 0 eq not {1 exch div} if
- exch
- aload pop
- 4 -1 roll dup 5 1 roll mul 3 1 roll
- 4 -1 roll dup 5 1 roll mul 3 1 roll
- 4 -1 roll dup 5 1 roll mul 3 1 roll
- 4 -1 roll pop
- dup 0 lt {neg} if
- collect
- } def
- /between {
- collect
- 0 nget 2 get exch 1 nget 2 get exch 3 1 roll
- lt {aload pop 3 1 roll exch 3 -1 roll collect} if
- 0 nget 2 get exch 2 nget 2 get exch 3 1 roll
- lt {aload pop 3 -1 roll exch 3 1 roll collect} if
- 1 nget 0 get exch 2 nget 2 get exch
- 2 nget 0 get exch 1 nget 2 get exch
- 1 nget 2 get exch 2 nget 2 get exch
- 7 1 roll add 5 1 roll mul 3 1 roll mul add exch div
- /xdisp exch def
- 1 nget 1 get exch 2 nget 2 get exch
- 2 nget 1 get exch 1 nget 2 get exch
- 1 nget 2 get exch 2 nget 2 get exch
- 7 1 roll add 5 1 roll mul 3 1 roll mul add exch div
- /ydisp exch def
- 0 nget aload pop 3 1 roll ydisp sub 3 1 roll xdisp sub 3 1 roll
- collect
- inverse dup
- /first exch def
- /second exch def
- 1 nget 1 get exch 2 nget 1 get exch 3 1 roll sub /xvect exch def
- 2 nget 0 get exch 1 nget 0 get exch 3 1 roll sub /yvect exch def
- xvect dup mul yvect dup mul add sqrt
- dup 0.0 eq not {first 2 get 2 mul exch div} if
- dup xvect mul /xvect exch def
- yvect mul /yvect exch def
- first aload pop 3 1 roll yvect add 3 1 roll xvect add 3 1 roll
- collect
- inverse /first exch def
- second aload pop 3 1 roll yvect sub 3 1 roll xvect sub 3 1 roll
- collect
- inverse /second exch def
- first second
- first 2 get second 2 get sub
- 0 gt { exch } if
- pop
- aload pop
- 3 1 roll ydisp add 3 1 roll xdisp add 3 1 roll collect
- exch pop
- } def
- /appol {
- aload pop 3 polydup between
- dup circle
- 2 nget CLW gt { 1 1 3 { pop 3 polydup collect 5 1 roll 4 -1 roll } for } if
- pop pop pop pop
- } def
- /inside {
- /temp exch def
- 0 120 240 {
- /angle exch def
- temp aload pop
- 3 sqrt 2 div 1 add div
- /radius exch def
- angle sin radius mul
- angle cos radius mul
- exch 4 -1 roll add
- 3 1 roll add
- radius 3 sqrt 2 div mul
- collect
- } for
- } def
-%
- \pst@number\pslinewidth SLW
- [ 0 0 \pst@number\pst@fractal@Radius ] dup inside 4 polydup
- 1 1 4 { pop circle } for
- 1 1 4 { pop 3 polydup collect 5 1 roll 4 1 roll } for
- pop pop pop pop { count 0 eq { exit } if appol } loop
+ \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%
+ \pst@usecolor\pslinecolor
+ \pst@fractal@scale
+ \pst@number\pslinewidth SLW ^^J%
+ tx@Appolonius end ^^J%
}% end add@pscode
\psk@fillstyle%
- \addto@pscode{stroke}%
+ \addto@pscode{stroke grestore}%
\end@SpecialObj%
}}
%
\def\psPTree{\pst@object{psPTree}}
\def\psPTree@i{\@ifnextchar({\psPTree@ii}{\psPTree@ii(0,0)}}
\def\psPTree@ii(#1){{%
- \addbefore@par{xWidth=1cm,Color=false}%
+ \addbefore@par{xWidth=1cm,Color=false,c=0.5}%
\pst@getcoor{#1}\pst@tempA%
\begin@SpecialObj%
\addto@pscode{
- gsave
- \pst@tempA exch \pst@number\pst@fractal@xWidth 2 div sub exch translate
+ gsave ^^J%
+ \pst@tempA exch \pst@number\pst@fractal@xWidth 2 div sub exch translate ^^J%
\pst@usecolor\pslinecolor
\pst@fractal@scale
- \pst@number\pslinewidth \pst@fractal@Xscale div SLW
- /sqrt2 1.41421356237310 def
- /limit 1.2 def
- /r 1 def /g 0 def /b 0 def
- /icount 380 def
- /setWaveColor {
- /icount icount dup 780 gt { pop 380 }{ \pst@fractal@dIter add } ifelse def
- tx@addDict begin icount wavelengthToRGB
- Red Green Blue end setrgbcolor
- } def
- /box { % stack: size
- newpath
- 0 0 moveto
- dup 0 rlineto
- dup 0 exch rlineto
- dup 0.5 mul dup dup -1 mul exch rlineto
- -1 mul dup rlineto
- closepath
+ \pst@number\pslinewidth \pst@fractal@Xscale div SLW ^^J%
+ /sqrt2 1.41421356237310 def ^^J%
+ /minWidth \pst@number\pst@fractal@minWidth def
+ /r 1 def /g 0 def /b 0 def
+ /icount 380 def
+ /setWaveColor {
+ /icount icount dup 780 gt { pop 380 }{ \pst@fractal@dIter add } ifelse def ^^J%
+ tx@addDict begin icount ^^J%
+ \ifPst@CMYK wavelengthToCMYK Cyan Magenta Yellow Black end setcmykcolor ^^J%
+ \else wavelengthToRGB Red Green Blue end setrgbcolor \fi ^^J%
+ } def ^^J%
+ /Alpha1 { .5 1 \pst@fractal@c sub atan } bind def
+ /Alpha2 { .5 \pst@fractal@c atan } bind def
+ /box { \@percentchar stacksize ^^J % width on stack
+ /w ED
+ newpath %
+ 0 0 moveto %
+ w 0 rlineto % w 0 move right
+ 0 w rlineto % 0 w move up
+ w neg \pst@fractal@c mul w 0.5 mul % -c*w 0.5*w
+ rlineto % move left up
+ w \pst@fractal@c 1 sub mul % -(1-c)*w
+ w -0.5 mul rlineto % -(1-c)*w -0.5w move left down
+ closepath % close
\ifPst@fractal@Color
- setWaveColor fill
+ setWaveColor fill ^^J%
% r g b setrgbcolor fill r g b /g exch def /r exch def /b exch def
- \else stroke \fi
- dup limit gt {
- gsave
- dup dup sqrt2 div exch 0 exch translate 45 rotate box
+ \else stroke \fi %
+ w minWidth gt { % w w limit gt
+ gsave %
+ 0 w translate
+ Alpha1 rotate
+ w dup 0.5 mul 1 \pst@fractal@c sub w mul Pyth box % one w to leave on stack
+ grestore
+ gsave
+ dup dup dup % w w w w
+ 1 \pst@fractal@c sub mul % w w w w*(1-c)
+ exch 1.5 mul % w w w*(1-c) w*1.5
+ translate % w w
+ 360 Alpha2 sub rotate
+ 0.5 mul exch \pst@fractal@c mul Pyth box
grestore
- gsave
- dup sqrt2 div exch 2 div dup 3 mul translate 315 rotate box
- grestore
- }{ pop } ifelse
- } def
- \pst@number\pst@fractal@xWidth box
+ } if
+ } def
+ \pst@number\pst@fractal@xWidth box ^^J%
}% end add@pscode
\end@SpecialObj%
}}
@@ -432,42 +262,41 @@
\pst@getcoor{#1}\pst@tempA%
\begin@SpecialObj%
\addto@pscode{
- gsave
- \pst@tempA translate 0 0 moveto
- \pst@usecolor\pslinecolor
- \pst@fractal@scale
- /depth 0 def
- /depth++ { /depth depth 1 add def } def
- /depth-- { /depth depth 1 sub def } def
- /icount 380 def
- /setWaveColor {
- /icount icount dup 780 gt { pop 380 }{ \pst@fractal@dIter add } ifelse def
- tx@addDict begin icount wavelengthToRGB
- Red Green Blue end setrgbcolor
- } def
- /DoLine { % print a vert. line
- 0 \pst@number\pst@fractal@yWidth rlineto currentpoint
-% gsave
- \ifPst@fractal@Color setWaveColor \fi
- stroke
-% grestore
- translate 0 0 moveto
- } def
- /FractArrow {
- /sc exch def
- gsave
- sc dup scale
- \pst@number\pslinewidth SLW
- depth++ DoLine
- depth \pst@fractal@maxIter le {
- 135 rotate sc FractArrow
- -270 rotate sc FractArrow
- } if
- depth--
- grestore
- } def
- \pst@fractal@angle rotate
- #2 FractArrow
+ gsave ^^J%
+ \pst@tempA translate 0 0 moveto ^^J%
+ \pst@usecolor\pslinecolor ^^J%
+ \pst@fractal@scale ^^J%
+ /depth 0 def ^^J%
+ /depth++ { /depth depth 1 add def } def ^^J%
+ /depth-- { /depth depth 1 sub def } def ^^J%
+ /icount 380 def ^^J%
+ /setWaveColor { ^^J%
+ /icount icount dup 780 gt { pop 380 }{ \pst@fractal@dIter add } ifelse def ^^J%
+ tx@addDict begin icount ^^J%
+ \ifPst@CMYK wavelengthToCMYK Cyan Magenta Yellow Black end setcmykcolor ^^J%
+ \else wavelengthToRGB Red Green Blue end setrgbcolor \fi ^^J%
+ } def ^^J%
+ /DoLine { \@percentchar print a vert. line ^^J%
+ 0 \pst@number\pst@fractal@yWidth rlineto currentpoint ^^J%
+ \ifPst@fractal@Color setWaveColor \fi ^^J%
+ stroke ^^J%
+ translate 0 0 moveto ^^J%
+ } def ^^J%
+ /FractArrow { ^^J%
+ /sc exch def ^^J%
+ gsave ^^J%
+ sc dup scale ^^J%
+ \pst@number\pslinewidth SLW ^^J%
+ depth++ DoLine ^^J%
+ depth \pst@fractal@maxIter le { ^^J%
+ 135 rotate sc FractArrow ^^J%
+ -270 rotate sc FractArrow ^^J%
+ } if ^^J%
+ depth-- ^^J%
+ grestore ^^J%
+ } def ^^J%
+ \pst@fractal@angle rotate ^^J%
+ #2 FractArrow ^^J%
% 180 rotate #2 FractArrow
% stroke
}% end add@pscode
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 af3411ce767..33b263ef54f 100644
--- a/Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty
+++ b/Master/texmf-dist/tex/latex/pst-fractal/pst-fractal.sty
@@ -1,8 +1,11 @@
\RequirePackage{pstricks}
-\ProvidesPackage{pst-fractal}[2007/04/02 package wrapper for
+\ProvidesPackage{pst-fractal}[2007/09/25 package wrapper for
pst-fractal.tex (hv)]
\input{pst-fractal.tex}
-\IfFileExists{pst-fractal.pro}{\@addtofilelist{pst-fractal.pro}}{}%
+\IfFileExists{pst-fractal.pro}{%
+ \ProvidesFile{pst-fractal.pro}
+ [2007/05/14 v. 0.01, PostScript prologue file (hv)]
+ \@addtofilelist{pst-fractal.pro}}{}%
\ProvidesFile{pst-fractal.tex}
[\filedate\space v\fileversion\space `PST-fractal' (hv)]
\endinput