summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex')
-rw-r--r--Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex77
1 files changed, 51 insertions, 26 deletions
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 fa6df4f3d4f..1fc81444324 100644
--- a/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex
+++ b/Master/texmf-dist/tex/generic/pst-fractal/pst-fractal.tex
@@ -5,7 +5,7 @@
%%
%% Package `pst-fractal.tex'
%%
-%% Herbert Voss <voss _at_ pstricks dot de>
+%% Herbert Voss <hvoss _at_ tug.org>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
@@ -17,55 +17,54 @@
%%
\csname PSTfractalLoaded\endcsname
\let\PSTfractalLoaded\endinput
-\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
+\ifx\PSTricksLoaded\endinput\else \input pstricks.tex\fi
\ifx\PSTricksAddLoaded\endinput\else\input pstricks-add.tex\fi
-\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
+\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
-\def\fileversion{0.05}
-\def\filedate{2007/09/24}
+\def\fileversion{0.06}
+\def\filedate{2010/02/10}
\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
-\define@key[psset]{pst-fractal}{xWidth}{\pssetlength\pst@fractal@xWidth{#1}}
+\define@key[psset]{pst-fractal}{xWidth}[1cm]{\pssetlength\pst@fractal@xWidth{#1}}
\newdimen\pst@fractal@yWidth
-\define@key[psset]{pst-fractal}{yWidth}{\pssetlength\pst@fractal@yWidth{#1}}
+\define@key[psset]{pst-fractal}{yWidth}[1cm]{\pssetlength\pst@fractal@yWidth{#1}}
\psset[pst-fractal]{xWidth=1cm,yWidth=1cm}
-\define@key[psset]{pst-fractal}{type}{\def\pst@fractal@type{#1}}
+\define@key[psset]{pst-fractal}{type}[Julia]{\def\pst@fractal@type{#1}}
\psset[pst-fractal]{type=Julia}% or type=Mandel
\def\pst@fractal@Julia{Julia}\def\pst@fractal@Mandel{Mandel}
-\define@key[psset]{pst-fractal}{baseColor}{\pst@getcolor{#1}\pst@fractal@baseColor}
+\define@key[psset]{pst-fractal}{baseColor}[white]{\pst@getcolor{#1}\pst@fractal@baseColor}
\psset[pst-fractal]{baseColor=white}
%
-\define@key[psset]{pst-fractal}{cx}{\def\pst@fractal@cx{#1 }}
-\define@key[psset]{pst-fractal}{cy}{\def\pst@fractal@cy{#1 }}
-\define@key[psset]{pst-fractal}{dIter}{\def\pst@fractal@dIter{#1 }}
+\define@key[psset]{pst-fractal}{cx}[0]{\def\pst@fractal@cx{#1 }}
+\define@key[psset]{pst-fractal}{cy}[0]{\def\pst@fractal@cy{#1 }}
+\define@key[psset]{pst-fractal}{dIter}[1]{\def\pst@fractal@dIter{#1 }}
\psset[pst-fractal]{cx=0,cy=0,dIter=1}
-\define@key[psset]{pst-fractal}{maxIter}{\pst@checknum{#1}\pst@fractal@maxIter}
-\define@key[psset]{pst-fractal}{maxRadius}{\pst@checknum{#1}\pst@fractal@maxRadius}
+\define@key[psset]{pst-fractal}{maxIter}[255]{\pst@checknum{#1}\pst@fractal@maxIter}
+\define@key[psset]{pst-fractal}{maxRadius}[100]{\pst@checknum{#1}\pst@fractal@maxRadius}
\psset[pst-fractal]{maxIter=255,maxRadius=100}
-\define@key[psset]{pst-fractal}{plotpoints}{\pst@checknum{#1}\pst@fractal@plotpoints}
+\define@key[psset]{pst-fractal}{plotpoints}[2000]{\pst@checknum{#1}\pst@fractal@plotpoints}
\psset[pst-fractal]{plotpoints=2000}
%
-\define@key[psset]{pst-fractal}{angle}{\pst@getangle{#1}\pst@fractal@angle}
-\define@key[psset]{pst-fractal}{c}{\pst@checknum{#1}\pst@fractal@c}
+\define@key[psset]{pst-fractal}{angle}[0]{\pst@getangle{#1}\pst@fractal@angle}
+\define@key[psset]{pst-fractal}{c}[5]{\pst@checknum{#1}\pst@fractal@c}
\newdimen\pst@fractal@minWidth
-\define@key[psset]{pst-fractal}{minWidth}{\pssetlength\pst@fractal@minWidth{#1}}
+\define@key[psset]{pst-fractal}{minWidth}[1pt]{\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%
+\define@key[psset]{pst-fractal}{scale}[1]{\pst@getscale{#1}{\pst@fractal@scale}%
\let\pst@fractal@Xscale\pst@tempg}
\psset[pst-fractal]{scale=1}
%
\def\pst@fractal@radius{0.001 }
%
\newdimen\pst@fractal@Radius
-\define@key[psset]{pst-fractal}{Radius}{\pssetlength\pst@fractal@Radius{#1}}
+\define@key[psset]{pst-fractal}{Radius}[5cm]{\pssetlength\pst@fractal@Radius{#1}}
\define@boolkey[psset]{pst-fractal}[Pst@fractal@]{Color}[true]{}
\psset[pst-fractal]{Radius=5cm,Color=false}
%
@@ -100,7 +99,8 @@
\ignorespaces}
%
\def\psSier{\pst@object{psSier}}
-\def\psSier@i(#1)(#2)(#3){{%
+\def\psSier@i(#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
\pst@getcoor{#3}\pst@temp@C
@@ -113,6 +113,31 @@
}% end add@pscode
\end@SpecialObj%
}}
+\def\psSier@iii(#1)#2#3{%
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getlength{#2}\pst@tempB
+ \begin@OpenObj%
+ \addto@pscode{
+ /sierpy {
+ dup 1 ge
+ { 1 sub gsave 0.5 dup scale dup sierpy
+ 1 0 translate dup sierpy
+ -0.5 0.8660254 translate dup sierpy grestore
+ }{newpath
+ 0 0 moveto
+ 1 0 lineto 0.5 0.8660254 lineto closepath
+ gsave \pst@usecolor\pslinecolor
+ fill grestore } ifelse pop
+ } def
+ \pst@tempA\space translate
+ \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 }%
+ \end@OpenObj%
+}
+%
%
\def\psPhyllotaxis{\pst@object{psPhyllotaxis}}
\def\psPhyllotaxis@i{\@ifnextchar({\psPhyllotaxis@ii}{\psPhyllotaxis@ii(0,0)}}
@@ -134,17 +159,17 @@
\def\psFern{\pst@object{psFern}}
\def\psFern@i{\@ifnextchar({\psFern@ii}{\psFern@ii(0,0)}}
\def\psFern@ii(#1){{%
- \addbefore@par{linewidth=0.001pt,maxIter=20000,radius=0.001pt}%
+ \addbefore@par{scale=10,linewidth=0.001pt,maxIter=20000,radius=0.001pt}%
\pst@getcoor{#1}\pst@tempA%
\begin@SpecialObj%
\addto@pscode{
- \pst@tempA
+ \pst@fractal@Xscale
+ \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%
+ tx@fractalDict begin tx@Fern end
}% end add@pscode
\end@SpecialObj%
}}