diff options
author | Karl Berry <karl@freefriends.org> | 2019-02-27 21:55:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-02-27 21:55:03 +0000 |
commit | 76b6558e0bbc05f62b20a33abec3bfd4e0f693c9 (patch) | |
tree | 269c07e12bbb8dd31e60bbad19efb044d2d690c5 /Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex | |
parent | d539e42b960316ba5d865be611f9a3fe4b592d15 (diff) |
pst-marble (27feb19)
git-svn-id: svn://tug.org/texlive/trunk@50146 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex | 243 |
1 files changed, 183 insertions, 60 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex index 40b3120a3ea..aa2c45a4c01 100644 --- a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex @@ -55,7 +55,7 @@ \begin{document} -\title{pst-marble v 1.3a} +\title{pst-marble v 1.4} \subtitle{A PSTricks package to draw marble-like patterns} \author{ Aubrey \textsc{Jaffer}\\ @@ -79,7 +79,7 @@ \begin{abstract} -Marbling originated in Asia as a decorative art more than 800 years ago and spread to Europe in the 1500s where it was used for end-papers and book covers. +Marbling originated in Asia as a decorative art more than 800 years ago and spread to Europe in the 1500s where it was used for end-papers and book covers. The mathematical fascination with paint marbling is that while rakings across the tank stretch and deform the paint boundaries, they do not break or change the topology of the surface. With mechanical guides, a raking can be undone by reversing the motion of the rake to its original position. Raking is thus a physical manifestation of a homeomorphism, a continuous function between topological spaces (in this case between a topological space and itself) that has a continuous inverse function. \begin{center} @@ -429,28 +429,37 @@ The boundaries between virtual paint rings will be traversed using the Minsky ci \section{The command \Lcs{psMarble}} \begin{BDef} -\Lcs{psMarble}\OptArgs\Largr{x , y} +\Lcs{psMarble}\OptArgs\Largr{width,height} \end{BDef} +\begin{BDef} +\Lcs{psMarble}\OptArgs\Largr{x-,y-}\Largr{x+,y+} +\end{BDef} +If none of the optional arguments \Largr{width,height} or \Largr{x-,y-}\Largr{x+,y+} are taken, the default value \Largr{10,10} respectively \Largr{-5,-5}\Largr{5,5} is used. If the \verb!\begin{pspicture}! arguments do not match the optional arguments \Largr{width,height} or \Largr{x-,y-}\Largr{x+,y+} the image will be cropped or padded. -The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{background=}, \nxLkeyword{seed=}, \nxLkeyword{oversample=}, \\ \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}. - -The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimension of the image---the default is \Largr{10,10}. - -If the \verb!\begin{pspicture}! arguments do not match the optional argument \Largr{x , y}, then the image will be cropped or padded. +The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{spractions=},\nxLkeyword{background=}, \nxLkeyword{seed=}, \nxLkeyword{oversample=}, \nxLkeyword{overscan=}, \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}. \medskip -\begin{quote} +\begin{quote}\small \begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} } \toprule \textbf{Name} & \textbf{Default} & \textbf{Meaning} \\ \midrule \Lkeyword{actions} & 0 0 35 colors 35 concentric-rings & The type of marbling action\\ -\Lkeyword{background} & [0 0 0] & Background color to be used with rgb or RGB or hexadecimal notation\\ +% +\Lkeyword{spractions} & \{\} & Specifies the sequence of spray commands to perform. Spray commands are performed after marbling.\\ +% +\Lkeyword{background} & [1 1 1] & Background color to be used with rgb or RGB or hexadecimal notation\\ +% \Lkeyword{seed} & Mathematical Marbling & Random seed to obtain the same arrangement of random drops within \texttt{Gaussian-drops} and \texttt{uniform-drops}\\ -\Lkeyword{oversample} & 0 & This is a rendering option: \texttt{oversample=0} makes the image pixel free; \texttt{oversample>0}: the smaller the positive value, the larger the pixels.\\ +% +\Lkeyword{oversample} & 0 & This is a rendering option: \texttt{oversample=0} makes the image pixel free; \texttt{oversample>0}: the smaller the positive value, the larger the pixels.\\ +% +\Lkeyword{overscan} & 1 & When the \texttt{overscan} value is greater than \texttt{1}, proportionally more image (outside of the specified area) is shown, and the specified area is outlined with a dashed rectangular border.\\ +% \Lkeyword{bckg} & true & Boolean: to turn on/off the background color\\ -\Lkeyword{colors} & \parbox{5cm}{ +% +\Lkeyword{colors} & \parbox[t]{4cm}{ [0.275 0.569 0.796] [0.965 0.882 0.302] [0.176 0.353 0.129] @@ -461,14 +470,18 @@ If the \verb!\begin{pspicture}! arguments do not match the optional argument \La [0.816 0.333 0.475] [0.365 0.153 0.435] [0.624 0.588 0.439] -} & Colors of the marbling can be set within the rgb-color system or as hexadecimal color constants. Shown are rgb constants between 0 and 1.\\ +} & Colors of the marbling can be set within the rgb-color system or as hexadecimal color constants. Shown are rgb constants between \texttt{0} and \texttt{1}.\\ +% \Lkeyword{drawcontours} & false & Boolean: if set to \texttt{true}, it only draws the contours\\ +% \Lkeyword{viscosity} & 1000 & Global primitive: viscosity of the system\\ \bottomrule \end{tabularx} \end{quote} -\medskip + +\newpage + \textbf{Notes:} @@ -540,6 +553,37 @@ The reason that we don't always reverse-render is because its resolution is limi \newpage +\subsection{\texttt{overscan}} + +When the overscan value is greater than 1, proportionally more image (outside of the specified area) is shown, and the specified +area is outlined with a dashed rectangular border. This is a utility for developing marblings, new for version 1.4. + +\begin{minipage}[t]{6cm}\kern0pt +\begin{pspicture}(-3,-3)(3,3) +\psMarble[overscan=2](6,6) +\end{pspicture} +{\small\begin{verbatim} +\begin{pspicture}(-3,-3)(3,3) +\psMarble[overscan=2](6,6) +\end{pspicture} +\end{verbatim}} +\end{minipage} +\hfill +\begin{minipage}[t]{6cm}\kern0pt +\begin{pspicture}(-3,-3)(3,3) +\psMarble[overscan=1.5](6,6) +\end{pspicture} +{\small\begin{verbatim} +\begin{pspicture}(-3,-3)(3,3) +\psMarble[overscan=1.5](6,6) +\end{pspicture} +\end{verbatim}} +\end{minipage} + + +\newpage + + \section{Colors} All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword{colors=} which are initially setup within the \texttt{pst-marble.pro}, we can change them within the concentric circles basic figure \texttt{concentric-rings} as follows: @@ -694,7 +738,7 @@ Used for \texttt{rake} and \texttt{line-drops} command. actions={ 0 250 90 [ 6 80 0 tines ] colors 4 get 20 line-drops 0 -250 90 [ 6 80 50 tines ] [[0.2 0.5 1][1 0 1]] 20 line-drops -}] +}](10,10) \rput(0,2.5){ \psdot[linecolor=red](0,0) \uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}} @@ -721,7 +765,7 @@ actions={ actions={ 0 250 90 [ 6 80 0 tines ] colors 4 get 20 line-drops 0 -250 90 [ 6 80 50 tines ] [[0.2 0.5 1][1 0 1]] 20 line-drops -}] +}](10,10) \rput(0,2.5){ \psdot[linecolor=red](0,0) \uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}} @@ -881,7 +925,7 @@ Drops \texttt{cnt} paint drops with radius \texttt{drad} in arc around \texttt{x actions={ 0 0 400 30 95 0 [ 231 204 155 ] 20 25 coil-drops 0 0 300 180 35 -4 [[ 128 65 11 ][ 65 128 11 ]] 50 20 coil-drops -}] +}](10,10) \end{pspicture*} \end{center} {\tiny\begin{verbatim} @@ -891,7 +935,7 @@ actions={ actions={ 0 0 400 30 95 0 [ 231 204 155 ] 20 25 coil-drops 0 0 300 180 35 -4 [[ 128 65 11 ][ 65 128 11 ]] 50 20 coil-drops -}] +}](10,10) \end{pspicture*} \end{verbatim}} @@ -923,7 +967,7 @@ colors={ actions={ 200 0 100 0 1 colors 150 10 Gaussian-drops -300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops -}] +}](10,10) \pscircle[linecolor=red](2,0){!1}\pscircle[linecolor=red](2,0){!1 2 sqrt mul} \pscircle[linecolor=red](2,0){!1 2 mul} \rput{60}(-3,0){ @@ -948,7 +992,7 @@ colors={ actions={ 200 0 100 0 1 colors 150 10 Gaussian-drops -300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops -}] +}](10,10) \pscircle[linecolor=red](2,0){!1}\pscircle[linecolor=red](2,0){!1 2 sqrt mul} \pscircle[linecolor=red](2,0){!1 2 mul} \rput{60}(-3,0){ @@ -987,7 +1031,7 @@ actions={ -300 -200 150 200 0 colors 4 get 25 12 uniform-drops 100 300 400 50 0 colors 3 get 30 8 uniform-drops -200 300 50 400 45 colors 5 get 30 8 uniform-drops -}] +}](10,10) \rput(0,0){\psframe(-1,-1)(1,1)} \psline[linecolor=red]{|<->|}(-1,-1.2)(1,-1.2)\uput[-90](0,-1.2){\textcolor{red}{200}} \psline[linecolor=red]{|<->|}(1.2,-1)(1.2,1)\uput[0](1.2,0){\textcolor{red}{200}} @@ -1014,7 +1058,7 @@ actions={ -300 -200 150 200 0 colors 4 get 25 12 uniform-drops 100 300 400 50 0 colors 3 get 30 8 uniform-drops -200 300 50 400 45 colors 5 get 30 8 uniform-drops -}] +}](10,10) \rput(0,0){\psframe(-1,-1)(1,1)} \psline[linecolor=red]{|<->|}(-1,-1.2)(1,-1.2)\uput[-90](0,-1.2){\textcolor{red}{200}} \psline[linecolor=red]{|<->|}(1.2,-1)(1.2,1)\uput[0](1.2,0){\textcolor{red}{200}} @@ -1226,7 +1270,7 @@ actions={9 -2 2 } for % angle r V tU D 45 [ 200 ] 20 -100 50 rake -}]% +}](10,10) \psMarble[viscosity=1000, bckg=false, linewidth=0.1, @@ -1236,7 +1280,7 @@ actions={9 -2 2 /rad exch sqrt 50 mul def 0 0 rad [1 0.5 0] drop } for -}]% +}](10,10) \psline[linecolor=red](-5,-5)(5,5) \rput(!2 sqrt 2 sqrt neg){\psline[linecolor=yellow](-5,-5)(5,5)} \psarcn[linewidth=0.1]{->}(0,0){3}{90}{45} @@ -1294,7 +1338,7 @@ actions={ 0 0 50 2 sqrt mul colors 9 concentric-rings % angle r V tU D 45 [200] 20 -100 50 rake -}](10,10)% +}](10,10) \psline[linecolor=red](-5,-5)(5,5) \rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)} \psarcn[linewidth=0.1]{->}(0,0){2}{90}{45} @@ -1314,7 +1358,7 @@ actions={ 0 0 50 2 sqrt mul colors 9 concentric-rings % angle r V tU D 45 [200] 20 -100 50 rake -}](10,10)% +}](10,10) \psline[linecolor=red](-5,-5)(5,5) \rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)} \psarcn[linewidth=0.1]{->}(0,0){2}{90}{45} @@ -1352,7 +1396,7 @@ actions={ 0 0 50 2 sqrt mul colors 9 concentric-rings % angle r V tU D 45 [200] 20 100 50 rake -}](10,10)% +}](10,10) \psline[linecolor=red](-5,-5)(5,5) \rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)} \psarcn[linewidth=0.1]{->}(0,0){2}{90}{45} @@ -1372,7 +1416,7 @@ actions={ 0 0 50 2 sqrt mul colors 9 concentric-rings % angle r V tU D 45 [200] 20 100 50 rake -}](10,10)% +}](10,10) \psline[linecolor=red](-5,-5)(5,5) \rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)} \psarcn[linewidth=0.1]{->}(0,0){2}{90}{45} @@ -1610,7 +1654,7 @@ Setting: \verb! 0 0 [ 350 ] 10 -70 10 stir ! 350 20 cos mul 350 20 sin mul 15 [0.49 0.75 0.79] drop 350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop 350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop - }] + }](10,10) \psMarble[viscosity=20,bckg=false, actions={ 350 0 15 [0.22 0.27 0.4] drop @@ -1618,7 +1662,7 @@ Setting: \verb! 0 0 [ 350 ] 10 -70 10 stir ! 350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop 350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop 0 0 [ 350 ] 10 -70 10 stir - }] + }](10,10) \psarc[arrowinset=0]{->}(0,0){3.9}{0}{70} \psline[linecolor=blue](0;0)(3.5;0) \psline[linecolor=blue](0;0)(3.5;70) @@ -2169,7 +2213,7 @@ colors={ }, actions={ 0 0 43 colors 32 concentric-rings -30 300 shift}] +30 300 shift}](10,10) \pstVerb{ /scaleFactor 10 1000 div def /xS1 30 sin 300 mul scaleFactor mul def @@ -2196,7 +2240,7 @@ colors={ }, actions={ 0 0 43 colors 32 concentric-rings -30 300 shift}] +30 300 shift}](10,10) \pstVerb{ /scaleFactor 10 1000 div def /xS1 30 sin 300 mul scaleFactor mul def @@ -2215,6 +2259,81 @@ actions={ \newpage +\section{Spray actions} + +Spray actions are intended for drops small enough that they don't noticeably move paint boundaries. The radii of spray droplets are the cube roots of log-normal distributed values with mean \texttt{Rd}. + +Spray commands are performed after marbling! + + +\subsection{\texttt{Gaussian-spray}} + +\begin{verbatim} +xc yc r ang eccentricity [ rgb ] n Rd Gaussian-spray +\end{verbatim} +Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a circular or elliptical disk centered at \texttt{xc, yc} having mean radius \texttt{Rd}, \texttt{ang} degrees clockwise from vertical, and length-to-width ratio \texttt{eccentricity}. For a circular disk, 63\,\% of drops are within radius $r$, 87\,\% of drops are within $r\sqrt{2}$, and 98\,\% of drops are within radius $2r$. + +\begin{center} +\begin{pspicture}(-5.5,-5.5)(5.5,5.5) +\psMarble[ + colors={[0.95 0.95 0.95]}, + spractions={ + 0 0 250 -45 1 [0.3 0 0.5] 1000 3 Gaussian-spray +}](11,11) +\pscircle[linecolor=red,linestyle=dashed](0,0){2.5} +\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 mul} +\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 sqrt mul} +\end{pspicture} +\end{center} +{\small\begin{verbatim} +\begin{pspicture}(-5.5,-5.5)(5.5,5.5) +\psMarble[ + colors={[0.95 0.95 0.95]}, + spractions={ + 0 0 250 -45 1 [0.3 0 0.5] 1000 3 Gaussian-spray +}](11,11) +\pscircle[linecolor=red,linestyle=dashed](0,0){2.5} +\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 mul} +\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 sqrt mul} +\end{pspicture} +\end{verbatim}} + + +\newpage + + +\subsection{\texttt{uniform-spray}} + +\begin{verbatim} +xc yc xsid ysid angle [ rgb ] n Rd uniform-spray +\end{verbatim} +Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a \texttt{xsid} by \texttt{ysid} rectangle centered at location \texttt{xc, yc} and rotated by \texttt{ang} degrees clockwise from vertical. + +\begin{center} +\begin{pspicture}(-5,-5)(5,5) +\psMarble[ + colors={[0.95 0.95 0.95]}, + spractions={ + 0 0 600 600 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 650 4 uniform-spray +}](10,10) +\psframe[linecolor=red,linestyle=dashed](-3,-3)(3,3) +\end{pspicture} +\end{center} +{\small\begin{verbatim} +\begin{pspicture}(-5,-5)(5,5) +\psMarble[ + colors={[0.95 0.95 0.95]}, + spractions={ + 0 0 600 600 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 650 4 uniform-spray +}](10,10) +\psframe[linecolor=red,linestyle=dashed](-3,-3)(3,3) +\end{pspicture} +\end{verbatim}} + + +\newpage + + \section{Combined actions -- Gallery} Note that \texttt{pst-marble} ships with an ``examples'' folder. Therein some example files contain some advanced PostScript techniques (for the interested PostScript user). @@ -2632,8 +2751,7 @@ actions={ 0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops 0 0 150 0 70 10 [105 160 99] 35 20 coil-drops 250 0 [ 120 80 ] 20 100 20 stir -} -] +}](10,10) \psMarble[ colors={ [0 0 0] @@ -2657,8 +2775,7 @@ actions={ 0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops 0 0 150 0 70 10 [0 0 0] 35 20 coil-drops 250 0 [ 120 80 ] 20 100 20 stir -} -] +}](10,10) \end{pspicture} \end{minipage} \begin{minipage}[t]{8cm} @@ -2690,8 +2807,7 @@ actions={ 0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops 0 0 150 0 70 10 [105 160 99] 35 20 coil-drops 250 0 [ 120 80 ] 20 100 20 stir -} -] +}](10,10) \psMarble[ colors={ [0 0 0] @@ -2715,8 +2831,7 @@ actions={ 0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops 0 0 150 0 70 10 [0 0 0] 35 20 coil-drops 250 0 [ 120 80 ] 20 100 20 stir -} -] +}](10,10) \end{pspicture} \end{verbatim}} \end{minipage} @@ -2733,11 +2848,7 @@ actions={ background={ [0.1 0 0.1] }, - colors={ - (e7cc9b) - (c28847) - (80410b) - }, + colors={(e7cc9b)(c28847)(80410b)}, viscosity=1000, actions={ %% coffee mug rim and stirred foam @@ -2748,11 +2859,16 @@ actions={ 0 0 283 0 1 colors 1 get 30 30 Gaussian-drops 0 0 -50e3 100 vortex %% tulip - 0 -250 55 colors 0 get drop - 0 -200 35 colors 2 get drop - 0 -150 55 colors 0 get drop - 0 -100 35 colors 2 get drop - 0 -50 55 colors 0 get drop + 0 -250 30 colors 1 get drop + 0 -250 50 colors 0 get drop + 0 -200 20 colors 1 get drop + 0 -200 30 colors 2 get drop + 0 -150 30 colors 1 get drop + 0 -150 50 colors 0 get drop + 0 -100 20 colors 1 get drop + 0 -100 30 colors 2 get drop + 0 -50 30 colors 1 get drop + 0 -50 50 colors 0 get drop 0 75 0 -450 20 30 stylus %% wreath 0 10 390 90 95 0 colors 1 get 14 25 coil-drops @@ -2762,6 +2878,9 @@ actions={ -100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops -100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops -300 200 300 350 20 30 stylus + }, + spractions={ + 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray } ](12,12) \end{pspicture} @@ -2772,11 +2891,7 @@ actions={ background={ [0.1 0 0.1] }, - colors={ - (e7cc9b) - (c28847) - (80410b) - }, + colors={(e7cc9b)(c28847)(80410b)}, viscosity=1000, actions={ %% coffee mug rim and stirred foam @@ -2787,11 +2902,16 @@ actions={ 0 0 283 0 1 colors 1 get 30 30 Gaussian-drops 0 0 -50e3 100 vortex %% tulip - 0 -250 55 colors 0 get drop - 0 -200 35 colors 2 get drop - 0 -150 55 colors 0 get drop - 0 -100 35 colors 2 get drop - 0 -50 55 colors 0 get drop + 0 -250 30 colors 1 get drop + 0 -250 50 colors 0 get drop + 0 -200 20 colors 1 get drop + 0 -200 30 colors 2 get drop + 0 -150 30 colors 1 get drop + 0 -150 50 colors 0 get drop + 0 -100 20 colors 1 get drop + 0 -100 30 colors 2 get drop + 0 -50 30 colors 1 get drop + 0 -50 50 colors 0 get drop 0 75 0 -450 20 30 stylus %% wreath 0 10 390 90 95 0 colors 1 get 14 25 coil-drops @@ -2801,6 +2921,9 @@ actions={ -100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops -100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops -300 200 300 350 20 30 stylus + }, + spractions={ + 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray } ](12,12) \end{pspicture} |