summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex
diff options
context:
space:
mode:
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.tex1368
1 files changed, 995 insertions, 373 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 aa2c45a4c01..014b07a6830 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
@@ -53,9 +53,30 @@
\let\belowcaptionskip\abovecaptionskip
\parindent0pt
+\newcommand\mycmd[2]{
+ \smallskip
+ \qquad {#1} \texttt{#2}
+}
+
+\newcommand\myparam[2]{
+ \smallskip
+ \qquad \texttt{#1=} \texttt{#2}
+}
+\newcommand\myparamb[2]{
+ \smallskip
+ \qquad \texttt{#1=} \texttt{{\char`\{}#2{\char`\}}}
+}
+
+\definecolor{Mycolor2}{HTML}{008000}
+\newcommand\rgb{\textit{\textcolor{red}{r}\textcolor{Mycolor2}{g}\textcolor{blue}{b}}
+}
+\newcommand\rgbs{\texttt{[}\rgb~...\texttt{]} }
+\newcommand\Rs{\texttt{[}$R$~...\texttt{]} }
+
+
\begin{document}
-\title{pst-marble v 1.4}
+\title{pst-marble v 1.6}
\subtitle{A PSTricks package to draw marble-like patterns}
\author{
Aubrey \textsc{Jaffer}\\
@@ -71,13 +92,10 @@
\vfill
{\small This program can redistributed and/or modified under the terms of the LaTeX Project Public License Distributed from CTAN archives in directory \texttt{macros/latex/base/lppl.txt}; either version 1.3c of the License, or (at your option) any later version.}
-
\psset{unit=1cm}
-
\clearpage
-
\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.
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.
@@ -99,38 +117,47 @@ The mathematical fascination with paint marbling is that while rakings across th
viscosity=1000,
actions={
0 0 24 colors 36 concentric-rings
- 180 [ 20 50 25 tines ] 40 200 31 rake
+ 180 [ 20 50 -25 tines ] 40 200 31 rake
0 350 shift
- 0 270 0 -120 wiggle
- 180 [ 3 600 -150 tines ] 40 200 31 rake
- 0 270 0 240 wiggle
- 180 [ 3 600 150 tines ] 40 200 31 rake
- 0 270 0 -120 wiggle
+ 0 480 120 0 -240 jiggle
+ 180 [ -150 450 ] 40 200 31 rake %[ 2 600 -150 tines ]
+ 0 480 120 0 240 jiggle
+ 0 480 120 0 240 jiggle
+ 180 [ -450 150 ] 40 200 31 rake %[ 2 600 -450 tines ]
+ 0 480 120 0 -240 jiggle
}
- ](12,12)
+ ](-6,-6)(6,6)
\psframe(-8,-6)(6,6)
\rput{90}(-7,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
\end{pspicture}
\end{center}
{\tiny\begin{verbatim}
\begin{pspicture}(-8,-6)(6,6)
- \psMarble[background={[1 1 1]},
+ \psMarble[
+ background={
+ [1 1 1]
+ },
colors={
- [0.176 0.353 0.129][0.635 0.008 0.094]
- [0.078 0.165 0.518][0.824 0.592 0.031]
- [0.059 0.522 0.392][0.816 0.333 0.475]
+ [0.176 0.353 0.129]
+ [0.635 0.008 0.094]
+ [0.078 0.165 0.518]
+ [0.824 0.592 0.031]
+ [0.059 0.522 0.392]
+ [0.816 0.333 0.475]
},
+ viscosity=1000,
actions={
0 0 24 colors 36 concentric-rings
- 180 [ 20 50 25 tines ] 40 200 31 rake
+ 180 [ 20 50 -25 tines ] 40 200 31 rake
0 350 shift
- 0 270 0 -120 wiggle
- 180 [ 3 600 -150 tines ] 40 200 31 rake
- 0 270 0 240 wiggle
- 180 [ 3 600 150 tines ] 40 200 31 rake
- 0 270 0 -120 wiggle
+ 0 480 120 0 -240 jiggle
+ 180 [ -150 450 ] 40 200 31 rake %[ 2 600 -150 tines ]
+ 0 480 120 0 240 jiggle
+ 0 480 120 0 240 jiggle
+ 180 [ -450 150 ] 40 200 31 rake %[ 2 600 -450 tines ]
+ 0 480 120 0 -240 jiggle
}
- ](12,12)
+ ](-6,-6)(6,6)
\psframe(-8,-6)(6,6)
\rput{90}(-7,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
\end{pspicture}
@@ -189,7 +216,7 @@ The documentation illustrates the parameters that are now used:
Center coordinates in mm, circulation in $\mathrm{mm^2/s}$ and time in s.
-The primitive \texttt{line} has now become \texttt{rake} and allows to represent the obtained image when the artist equips himself with a comb (rake) having a certain number of identical teeth of a given diameter. He places the comb perpendicularly to a direction fixed by the angle made with the $y$-axis (the angle is positive clockwise) and moves it with a speed of (\texttt{V}) along the indicated direction or contrary to it, depending on the sign of the parameter \texttt{tU}. The positions of the teeth are fixed by the distances (in mm) indicated within the list [between the brackets]---the comb/rake can also have only one tooth.
+The primitive \texttt{line} has now become \texttt{rake} and allows to represent the obtained image when the artist equips himself with a comb (rake) having a certain number of identical teeth of a given diameter. He places the comb perpendicularly to a direction fixed by the angle made with the $y$-axis (the angle is positive clockwise) and moves it with a speed of (\texttt{V}) along the indicated direction or contrary to it, depending on the sign of the parameter \texttt{S}. The positions of the teeth are fixed by the distances (in mm) indicated within the list [between the brackets]---the comb/rake can also have only one tooth.
By default, the tank's dimensions are 1 m $\times$ 1 m. The scaling factor of the image is 0.1. All lengths are in mm, velocities (in mm/s), angles (in degrees), angular velocity (in degrees/s), and viscosity and circulation (in $\mathrm{mm^2/s}$).
@@ -199,21 +226,23 @@ Aubrey Jaffer retains 1 global parameter: the dynamic viscosity, see in particul
\begin{center}
\url{https://arxiv.org/abs/1702.02106}
\end{center}
-There are 13 types of actions defined and ready to use:
+There are 15 types of actions defined and ready to use:
\begin{verbatim}
drop
line-drops
serpentine-drops
coil-drops
- Gaussian-drops
+ normal-drops
uniform-drops
concentric-rings
rake
stylus
stir
vortex
- wiggle
+ jiggle
+ wriggle
shift
+ turn
\end{verbatim}
They make it possible to create a very large variety of marblings with combinations of the various actions.
@@ -223,7 +252,7 @@ Initially there are drops of colors that the artist spreads with a brush on the
\end{verbatim}
Note, that the coordinates (\texttt{cx, cy}) of the center of the drop and its radius \texttt{r} are in points, the colors need to be setup in the rgb-color-system: (values between 0 and 1). Details are given in the following sections. So this is the first phase: arrange the drops on the surface in several stages with different radii and colors. To facilitate the experimentation of different types of actions, Aubrey Jaffer imagined an initial background obtained by dropping (one after the other) drops of different colors (we can also differentiate their radii) at the same point, they all have the same center, we then obtain an initial background consisting of concentric rings, named ``concentric-rings''.
-Aubrey Jaffer coded all the possible simulations with the expected deformations (rake, stylus, stir, wiggle, vortex) in pure PostScript and his new code, perfectly structured, and whose use is very simple, would be enough to itself, if it weren't necessary for each test, to add lines, delete others, save them within the original PostScript file \ldots
+Aubrey Jaffer coded all the possible simulations with the expected deformations (rake, stylus, stir, jiggle, vortex) in pure PostScript and his new code, perfectly structured, and whose use is very simple, would be enough to itself, if it weren't necessary for each test, to add lines, delete others, save them within the original PostScript file \ldots
Therefore, Manuel Luque and Jürgen Gilg have decided to adapt that into PSTricks (with the agreement of Aubrey Jaffer). A \verb+\psMarble+ command to switch easily between the different types of actions and add a global viscosity parameter to the PostScript code. There are two ways to calculate and represent the drops.
\begin{itemize}
@@ -436,11 +465,11 @@ The boundaries between virtual paint rings will be traversed using the Minsky ci
\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{spractions=},\nxLkeyword{background=}, \nxLkeyword{seed=}, \nxLkeyword{oversample=}, \nxLkeyword{overscan=}, \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}.
+The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{spractions=},\nxLkeyword{background=}, \nxLkeyword{paper=}, \nxLkeyword{seed=}, \nxLkeyword{oversample=}, \nxLkeyword{overscan=}, \nxLkeyword{shadings=}, \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}.
\medskip
-\begin{quote}\small
+{\small
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }
\toprule
\textbf{Name} & \textbf{Default} & \textbf{Meaning} \\
@@ -449,9 +478,15 @@ The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeywo
%
\Lkeyword{spractions} & \{\} & Specifies the sequence of spray commands to perform. Spray commands are performed after marbling.\\
%
+\Lkeyword{shadings} & \{\} & Shading is always performed for \texttt{spractions}, but only when \texttt{oversample > 0} for \texttt{actions}.\\
+%
\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{paper} & [1 1 1] & Specifies the paper color for \texttt{shadings} commands\\
+%
+\Lkeyword{drawcontours} & false & Boolean: if set to \texttt{true}, it only draws the contours\\
+%
+\Lkeyword{seed} & Mathematical Marbling & Random seed to obtain the same arrangement of random drops within \texttt{normal-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.\\
%
@@ -459,25 +494,18 @@ The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeywo
%
\Lkeyword{bckg} & true & Boolean: to turn on/off the background color\\
%
-\Lkeyword{colors} & \parbox[t]{4cm}{
-[0.275 0.569 0.796]
-[0.965 0.882 0.302]
-[0.176 0.353 0.129]
-[0.635 0.008 0.094]
-[0.078 0.165 0.518]
-[0.824 0.592 0.031]
-[0.059 0.522 0.392]
-[0.816 0.333 0.475]
-[0.365 0.153 0.435]
-[0.624 0.588 0.439]
+\Lkeyword{colors} & \parbox[t]{7.5cm}{\footnotesize
+[0.275 0.569 0.796][0.965 0.882 0.302]
+[0.176 0.353 0.129][0.635 0.008 0.094]
+[0.078 0.165 0.518][0.824 0.592 0.031]
+[0.059 0.522 0.392][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 \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}
+}
\newpage
@@ -486,13 +514,14 @@ The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeywo
\textbf{Notes:}
\begin{itemize}
+\item There must be no empty lines inside brackets for \texttt{actions=}, \texttt{spraction=}, etc.
\item If \texttt{oversample>0}, the image will be pixeled.
\item The Boolean option \texttt{drawcontours} is by default set to \texttt{false}. If set to \texttt{true}, only the contours are drawn within the image.
\item Sometimes it is quite helpful to be able to turn off the background color. This can be handled with the Boolean key \texttt{bckg}, which if set to \texttt{false} turns off the background color.
\item Colors can be setup within the rgb-color-system: \verb!colors={[0.1 0.4 0.9] [1 0 1] ... }! or \verb!colors={[255 0 0] [123 245 129] ... }!. As well can be entered hexadecimal color constants which are set up within parentheses like: \verb!colors={(e7cc9b) (c28847) (80410b) ... }! or with capital letters like: \verb!colors={(E7CC9B) (C28847) (80410B) ... }!
\item For the \texttt{background} color curly braces are needed: \texttt{background=\{[0.2 0.5 0.7]\}}\\
or \texttt{background=\{[2 255 2]\}}.
-\item Following are introduced some basic actions, like \texttt{drop}, \texttt{line-drops}, \texttt{serpentine-drops},\texttt{coil-drops}, \texttt{Gaussian-drops}, \texttt{uniform-drops}, \texttt{concentric-rings}, \texttt{rake}, \texttt{stylus}, \texttt{stir}, \texttt{vortex}, \texttt{wiggle} and \texttt{shift}.
+\item Following are introduced some basic actions, like \texttt{drop}, \texttt{line-drops}, \texttt{serpentine-drops},\texttt{coil-drops}, \texttt{normal-drops}, \texttt{uniform-drops}, \texttt{concentric-rings}, \texttt{rake}, \texttt{stylus}, \texttt{stir}, \texttt{vortex}, \texttt{jiggle}, \texttt{wriggle}, \texttt{shift} and \texttt{turn}.
Within the basic actions \texttt{stir} and \texttt{vortex}, there is defined each with a radius \texttt{r} parameter. If \texttt{r<0} is set, the deformation is counterclockwise, if set to positive values, the deformation is clockwise.
\end{itemize}
@@ -509,6 +538,18 @@ The reason that we don't always reverse-render is because its resolution is limi
\subsection{\texttt{oversample}}
+\myparam{oversample}{0}
+
+When \texttt{oversample=0} a resolution-independent image is produced
+using contour-rendering. When the number of drops gets too large
+($>150$) triangular artifacts start to appear. Changing to
+\texttt{oversample=1} employs raster-rendering to more quickly compute
+each image pixel individually. When \texttt{oversample=2} the
+rendering takes four times as long, but each pixel is the averaged
+over its four quarters, producing an image nearly as good as
+\texttt{oversample=0}. When \texttt{oversample} is between 0 and
+1, the rendering is on a coarser grid than \texttt{oversample=1},
+speeding image production.
\begin{itemize}
\item \texttt{oversample=0} is contour rendering (pixel-free).
@@ -555,8 +596,12 @@ The reason that we don't always reverse-render is because its resolution is limi
\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.
+\myparam{overscan}{1}
+
+When the \texttt{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.
\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
@@ -586,6 +631,30 @@ area is outlined with a dashed rectangular border. This is a utility for develop
\section{Colors}
+RGB colors can be specified in three formats:
+
+\mycmd{\texttt{[ 0.906 0.8 0.608 ]}}{}
+
+Red, green, and blue color components between 0 and 1 in square
+brackets.
+
+\mycmd{\texttt{[ 231 204 155 ]}}{}
+
+Red, green, and blue color components between 0 and 255 in square
+brackets.
+
+\mycmd{\texttt{(e7cc9b)}}{}
+
+Red, green, and blue
+(\textcolor{red}{Rr}\textcolor{Mycolor2}{Gg}\textcolor{blue}{Bb})
+hexadecimal color components between \texttt{00} and \texttt{FF} (or
+\texttt{ff}) in parentheses.
+
+In the command arguments \rgbs indicates a bracketed sequence of
+colors. For example:
+
+\mycmd{\texttt{[(c28847) [231 204 155] [0.635 0.008 0.094]]}}{}
+
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:
\begin{minipage}[t]{6cm}\kern0pt
@@ -612,10 +681,8 @@ All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword
{\small\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[colors={
-[0.134 0.647 1.000]
-[0.977 0.855 0.549]
-[0.684 0.638 0.702]
-[0.730 0.965 0.942]
+[0.134 0.647 1.000][0.977 0.855 0.549]
+[0.684 0.638 0.702][0.730 0.965 0.942]
[0.040 0.236 0.424]
}](6,6)
\end{pspicture}
@@ -673,17 +740,10 @@ Some of the deformation \nxLkeyword{actions=} which are initially setup within t
\subsection{\texttt{drop}}
-\texttt{drop} defines a single drop set on the surface of a liquid.
-\begin{verbatim}
-cx cy r [ rgb ] drop
-
-cx, cy Center coordinates
-r Radius of the paint drop
-[rgb] Color of paint drop
-\end{verbatim}
-This initially is a circle with its center at \texttt{(cx,cy)} and a radius \texttt{r}. The paint color is defined by the rgb-color-system.
+\mycmd{$x$ $y$ $R_d$ \rgb}{drop}
-In order to interpolate the color in reverse-rendering, the adjacent color must be known.
+Places a drop of color \rgb and radius $R_d$ centered at location
+$x,y$.
\begin{center}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[background={[1 1 1]}, %white
@@ -717,11 +777,11 @@ actions={
\subsection{\texttt{line-drops}}
-\begin{verbatim}
-xc yc ang [ r ] [ rgb ] drad line-drops
-\end{verbatim}
+\mycmd{$x$ $y$ $\theta$ \Rs \rgbs $R_d$}{line-drops}
-Drops color \texttt{[rgb]} or color series of radius \texttt{drad} in a line centered at \texttt{xc, yc }and \texttt{ang} degrees from vertical (clockwise). One drop is placed at each \texttt{r} distance from \texttt{xc, yc}.
+Places drops of colors \rgbs (in sequence) of radius $R_d$ in
+a line through $x,y$ at $\theta$ degrees clockwise from upward
+at distances \Rs from $x,y$.
For [r] we can use
\begin{verbatim}
@@ -792,25 +852,13 @@ actions={
\subsection{\texttt{serpentine-drops}}
-\texttt{serpentine-drops} deposits a series of drops on a
- user-specified ``grid'' in a serpentine sequence.
-\begin{verbatim}
-xc yc [ x-places ] [ y-places ] ang rgb drad serpentine-drops
-
-xc, yc Coordinates of the center
-[ x-places ] x-coordinates for the x times y number of drops
-[ y-places ] y-coordinates for the x times y number of drops
-ang Rotation angle from vertical (clockwise)
-rgb Color of the drops or color series (array)
-drad Radius of the drops
-\end{verbatim}
-Places drops of colors \texttt{[ rgb ]} of radius \texttt{drad} in a serpentine
-pattern (starting lower left to right; right to left; left to right ...)
-at coordinates \texttt{[ x-places ] x [ y-places ]} relative to
-location \texttt{xc, yc} and rotated by \texttt{ang} degrees clockwise
-from vertical. The sequences \texttt{[ x-places ]} and \texttt{[ y-places ]}
-determine the order in which drops are placed. The resulting grid will not
-be square because each drop is moved by subsequent drops.
+\mycmd{$x$ $y$ {\texttt{[}$\Omega_\perp$~...\texttt{]} } {\texttt{[}$\Omega_\parallel$~...\texttt{]} } $\theta$ \rgbs $R_d$}{serpentine-drops}
+
+Places drops of colors \rgbs of radius $R_d$ in a serpentine pattern
+(starting lower left to right; right to left; left to right...) at
+offsets $\Omega_\perp \times \Omega_\parallel$ centered at location
+$x,y$ and rotated by $\theta$ degrees clockwise from upward. Orders
+of $\Omega_\perp$ and $\Omega_\parallel$ sequences matter.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
@@ -902,22 +950,13 @@ actions={
\subsection{\texttt{coil-drops}}
-\texttt{coil-drops} defines a series of drops along a circle or spiral.
-\begin{verbatim}
-xc yc r ang-strt arcinc rinc [rgb] cnt drad coil-drops
-
-xc, yc Coordinates of the center
-r Radius of the circle where the drops will lay on
-ang-str Start angle from vertical (clockwise)
-arcinc Arc-length between the drops
-rinc Increment of r: if taken 0 it gives a circle,
- if taken >0 it spirals outwards,
- if taken <0 it spirals inwards.
-rgb Color of the drops or color series (array)
-cnt Number of drops
-drad Radius of the drops
-\end{verbatim}
-Drops \texttt{cnt} paint drops with radius \texttt{drad} in arc around \texttt{xc,yc} at radius \texttt{r} starting at \texttt{ang-strt} and spaced by \texttt{arcinc} distance. \texttt{r} is incremented (or decremented if \texttt{rinc} is negative) by \texttt{rinc} after each drop.
+\mycmd{$x$ $y$ $R$ $\theta$ $S$ $\delta$ \rgbs $n$ $R_d$}{coil-drops}
+
+Places $n$ drops of colors \rgbs (in sequence) of radius
+$R_d$ in an arc or spiral centered at $x,y$ starting at radius $R$
+and $\theta$ degrees clockwise from upward,
+moving $S$ along the arc and incrementing the arc radius
+by $\delta$ after each drop.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
@@ -928,7 +967,7 @@ actions={
}](10,10)
\end{pspicture*}
\end{center}
-{\tiny\begin{verbatim}
+{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[bckg=false,viscosity=1000,
@@ -943,18 +982,17 @@ actions={
\newpage
-\subsection{\texttt{Gaussian-drops}}
-
-\texttt{Gaussian-drops} defines a randomly calculated series of drops mostly within a circle/ellipse.
-\begin{verbatim}
-xc yc r ang eccentricity [ rgb ] cnt drad Gaussian-drops
-\end{verbatim}
-
-Drops \texttt{cnt} paint drops with radius \texttt{drad} in normal (Gaussian) distribution centered at\texttt{ xc, yc} with radius \texttt{r}, \texttt{ang} degrees from vertical (clockwise) and length to width ratio \texttt{eccentricity} (1 is circular).
+\subsection{\texttt{normal-drops}}
-\texttt{[rgb]} can be one color or a color series.
+\mycmd{$x$ $y$ $L_\perp$ $L_\parallel$ $\theta$ \rgbs $n$ $R_d$}{normal-drops}
-63\,\% of drops are centered within radius \texttt{r}, 87\,\% of drops are centered within radius \texttt{r*sqrt(2)}, 98\,\% of drops are centered within radius \texttt{r*2}. The \texttt{eccentricity} stretches and shrinks the target from a circle into an ellipse. If \texttt{eccentricity>1}, it stretches the circle in \emph{y}-direction and shrinks it in \emph{x}-direction. If 0<eccentricity<1, it stretches the circle in \emph{x}-direction and shrinks it in \emph{y}-direction. \texttt{eccentricity} is the ratio of the major axis to the minor axis. And the \texttt{ang} should be the major axis counter-clockwise from vertical.
+Places $n$ drops of colors \rgbs of radius $R_d$ randomly in a
+circular or elliptical disk centered at $x,y$ having diameters
+$L_\perp$ and $L_\parallel$ respectively perpendicular and parallel to
+$\theta$ degrees clockwise from upward. For a circular disk
+($R=L_\parallel/2=L_\perp/2$), 63\,\% of drops are within radius $R$,
+87\,\% of drops are within $R\,\sqrt{2}$, and 98\,\% of drops are
+within radius $2\,R$.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
@@ -965,8 +1003,8 @@ colors={
[0.866 0.353 0.050][0.200 0.050 0.015]
},
actions={
-200 0 100 0 1 colors 150 10 Gaussian-drops
--300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops
+-300 0 100 200 30 [190 195 9] 55 3 normal-drops
+200 0 200 200 0 colors 150 3 normal-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}
@@ -980,7 +1018,7 @@ actions={
\uput{2cm}[75](-3,0){\textcolor{red}{\texttt{ang}}}
\end{pspicture*}
\end{center}
-{\tiny\begin{verbatim}
+{\footnotesize\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[bckg=false,viscosity=1000,
@@ -990,8 +1028,8 @@ colors={
[0.866 0.353 0.050][0.200 0.050 0.015]
},
actions={
-200 0 100 0 1 colors 150 10 Gaussian-drops
--300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops
+-300 0 100 200 30 [190 195 9] 55 3 normal-drops
+200 0 200 200 0 colors 150 3 normal-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}
@@ -1012,12 +1050,11 @@ actions={
\subsection{\texttt{uniform-drops}}
-\texttt{uniform-drops} defines a randomly calculated series of drops within a rectangled box.
-\begin{verbatim}
-xc yc xsid ysid angle [ rgb ] cnt drad uniform-drops
-\end{verbatim}
+\mycmd{$x$ $y$ $L_\perp$ $L_\parallel$ $\theta$ \rgbs $n$ $R_d$}{uniform-drops}
-Drops \texttt{cnt} paint drops with radius \texttt{drad} in a uniform distribution in a \texttt{xsid} by \texttt{ysid} box centered at \texttt{xc, yc} and rotated by \texttt{angle} from vertical (clockwise).
+Places $n$ drops of colors \rgbs of radius $R_d$ randomly in a $L_\perp$
+by $L_\parallel$ rectangle centered at location $x,y$ and rotated by $\theta$
+degrees clockwise from upward.
\texttt{[rgb]} can be one color or a color series.
\begin{center}
@@ -1081,48 +1118,16 @@ actions={
\subsection{\texttt{concentric-rings}}
-With \texttt{concentric-rings}, we set the number of different colored concentric rings (\texttt{count}) (at center \texttt{cx,cy}) with a thickness of \texttt{thick}.
-
-%The original PostScript code we find within \texttt{pst-marble.pro} as:
-%\begin{verbatim}
-%/concentric-rings { % xc yc thick [ color ] count
-% /cnt exch def
-% /clra exch def
-% /rinc exch def
-% /yc exch def
-% /xc exch def
-% /nclr clra length def
-% cnt 1 sub -1 0
-% {
-% /cnt exch def
-% cnt 0 eq
-% { xc yc rinc 2 div clra 0 get drop }
-% { xc yc cnt sqrt rinc mul clra cnt nclr mod get drop }
-% ifelse
-% } for
-%} bind def
-%\end{verbatim}
-
-%\textbf{Explanation:}
-%
-%We have 11 sets of drops, within every set, the drops have the same radii and their radii will decrease with every step. The last set is given by the argument \texttt{rinc} and all the other radii are a function of this final radius.
-%
-%Within the first set of drops (with same radii), the number of drops is \texttt{nbands}---every drop of it has a color taken from the colors array and its radius values \texttt{sqrt(11)*rinc}.
-%
-%The sets go from 11 to 1 with a step of 1, meaning that the second set has a radius of \texttt{sqrt(10)*rinc} etc.
-%
-%The last set has a radius of \texttt{sqrt(1)*rinc=rinc}.
-%
-%A last single drop is then added with the radius of \texttt{r=rinc/2}.
+\mycmd{x y thick [rgb] count}{concentric-rings}
-To code it within the \LaTeX{} file we use the following syntax:
+Specifies the sequence of marbling commands to perform. The default
+is a single command dropping 35 colors in the \texttt{colors}
+sequence. The available commands are listed below.
\begin{verbatim}
-xc yc thick [ color ] count concentric-rings
-
-cx, cy Center coordinates
-thick Thickness of the rings
-count Number of rings
-color Array of colors: [[rgb][rgb]...[rgb]]
+x, y Center coordinates
+thick Thickness of the rings
+count Number of rings
+rgb Array of colors: [[rgb][rgb]...[rgb]]
\end{verbatim}
\textbf{Example 1:}
@@ -1221,34 +1226,26 @@ If we like to change the colors as well, we do this with the \texttt{colors=\{..
\subsection{\texttt{rake}}
-This is to represent the image obtained when the artist is equipped with a comb (rake) containing a number of identical teeth of a given diameter. He places the comb perpendicularly to the direction fixed by the angle made with the axis $Oy$ (the angle is counted: if taken positive values---clockwise, if taken negative values---counterclockwise) and moves it with a speed of \texttt{V} in the indicated direction or contrary to it, following the sign of the parameter \texttt{tU}. The positions of the teeth are set up by the distances (in mm) indicated [ between brackets ], the comb can also have only one tooth.
+\mycmd{$\theta$ \Rs $V$ $S$ $D$}{rake}
+
+Pulls tines of diameter $D$ at $\theta$ degrees from the y-axis
+through the virtual tank at velocity $V$, moving fluid on the tine
+path a distance $S$. The tine paths are spaced \Rs from the tank
+center at their nearest points.
+
+This is to represent the image obtained when the artist is equipped with a comb (rake) containing a number of identical teeth of a given diameter. He places the comb perpendicularly to the direction fixed by the angle $\theta$ made with the axis $Oy$ (the angle is counted: if taken positive values---clockwise, if taken negative values---counterclockwise) and moves it with a speed of \texttt{V} in the indicated direction or contrary to it, following the sign of the parameter \texttt{S}. The positions of the teeth are set up by the distances (in mm) indicated [ between brackets ], the comb can also have only one tooth.
By default, the tank's dimensions are 1 m $\times$ 1 m. The scaling factor of the image is 0.1. All lengths are in mm, velocities (in mm/s), angles (in degrees), angular velocity (in degrees/s), and viscosity and circulation (in mm$^2$/s).
For a convex stylus or tine, \texttt{D} (in mm) is the ratio of its submerged volume to its wetted surface area. For a long cylinder it is its diameter.
-\begin{verbatim}
-angle [ r ] V tU D rake
-
-angle Angle from y-axis in degrees; 0 is up.
- - If angle positve: direction is north-east (>90 south-east).
- - If angle negative: direction is north-west (<-90 south-west).
-[ r ] List of distances to the teeth of the rake from its center.
- - If r positive: distance to tooth, right to the indicated direction.
- - If r positive: distance to tooth, left to the indicated direction.
-V Stylus velocity in mm/s
-tU Distance between the original points and the deformed points
- along the stylus track.
- - If tU positive: deformation in the indicated direction.
- - If tU negative: deformation contrary to the indicated direction.
-D Stylus diameter in mm. Make larger to affect paint farther away.
-\end{verbatim}
+
For the following examples \texttt{viscosity=1000} is set. This is a typical value (default value).
\newpage
-\textbf{Explanations for the key \texttt{tU}:}
+\textbf{Explanations for the key \texttt{S}:}
Setting: \verb! 45 [ 200 ] 20 -100 50 rake!
@@ -1268,7 +1265,7 @@ actions={9 -2 2
/rad exch sqrt 50 mul def
0 0 rad [0 0 0] drop
} for
-% angle r V tU D
+% angle r V S D
45 [ 200 ] 20 -100 50 rake
}](10,10)
\psMarble[viscosity=1000,
@@ -1305,13 +1302,13 @@ actions={9 -2 2
\begin{itemize}
\item The distance between $P$ and $Q$ is $|\overrightarrow{PQ}|$:
-$\text{\texttt{tU}}=|\overrightarrow{PQ}|=1\,\text{cm}$ with respect to the scaling factor 0.1 for the image, this gives \texttt{tU=100}, as it should.
+$\text{\texttt{S}}=|\overrightarrow{PQ}|=1\,\text{cm}$ with respect to the scaling factor 0.1 for the image, this gives \texttt{S=100}, as it should.
\item The distance between $R$ and $S$ is $|\overrightarrow{RS}|$:
-$\text{\texttt{tU}}=|\overrightarrow{RS}|=1\,\text{cm}$ with respect to the scaling factor 0.1 for the image, this gives \texttt{tU=100}, as it should.
+$\text{\texttt{S}}=|\overrightarrow{RS}|=1\,\text{cm}$ with respect to the scaling factor 0.1 for the image, this gives \texttt{S=100}, as it should.
\end{itemize}
-\textbf{Note:} Within the given example \texttt{tU=-100} was chosen \textit{negative}. This indicates that the deformation is made contrary to the stylus track (set with \texttt{angle=45} (at a distance \texttt{[r=200]} from the red line) and drawn in yellow, so points to north-east, thus the deformation points move necessarily to south-west.
+\textbf{Note:} Within the given example \texttt{S=-100} was chosen \textit{negative}. This indicates that the deformation is made contrary to the stylus track (set with \texttt{angle=45} (at a distance \texttt{[r=200]} from the red line) and drawn in yellow, so points to north-east, thus the deformation points move necessarily to south-west.
\newpage
@@ -1326,7 +1323,7 @@ The distance \texttt{[r=200]} (in mm) of one tooth from the center of the rake o
The stylus velocity is given with \texttt{V=20} (in mm/s).
-The distance \texttt{tU=-100} between the original points and the deformed points along the stylus track is set to negative (the deformation is made contrary to the to the direction of the stylus track). If taken a positive value for \texttt{tU}, the deformation is made in the direction of the stylus track.
+The distance \texttt{S=-100} between the original points and the deformed points along the stylus track is set to negative (the deformation is made contrary to the to the direction of the stylus track). If taken a positive value for \texttt{S}, the deformation is made in the direction of the stylus track.
The stylus parameter \texttt{D} (given in mm) is the ratio of its submerged volume to its wetted surface area. The bigger this value, the wider the area of points that are affected by the deformation.
\begin{center}
@@ -1336,7 +1333,7 @@ The stylus parameter \texttt{D} (given in mm) is the ratio of its submerged volu
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
-% angle r V tU D
+% angle r V S D
45 [200] 20 -100 50 rake
}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
@@ -1346,7 +1343,7 @@ actions={
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;225)}
-\rput(0.6,-1.7){\red tU}
+\rput(0.6,-1.7){\red S}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}}
\end{center}
@@ -1356,7 +1353,7 @@ actions={
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
-% angle r V tU D
+% angle r V S D
45 [200] 20 -100 50 rake
}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
@@ -1366,7 +1363,7 @@ actions={
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;225)}
-\rput(0.6,-1.7){\red tU}
+\rput(0.6,-1.7){\red S}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}
\end{verbatim}}
@@ -1384,7 +1381,7 @@ The distance \texttt{[r=200]} of one tooth from the center of the rake on the ri
The stylus velocity is given with \texttt{V=20} (in mm/s).
-The distance \texttt{tU=100} between the original points and the deformed points along the stylus track is set to positive (the deformation is made to the direction of the stylus track).
+The distance \texttt{S=100} between the original points and the deformed points along the stylus track is set to positive (the deformation is made to the direction of the stylus track).
The stylus parameter \texttt{D} (given in mm) is set to 50 mm.
\begin{center}
@@ -1394,7 +1391,7 @@ The stylus parameter \texttt{D} (given in mm) is set to 50 mm.
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
-% angle r V tU D
+% angle r V S D
45 [200] 20 100 50 rake
}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
@@ -1404,7 +1401,7 @@ actions={
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;45)}
-\rput(2.5,-0.9){\red tU}
+\rput(2.5,-0.9){\red S}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}}
\end{center}
@@ -1414,7 +1411,7 @@ actions={
colors={[0 0 0]},
actions={
0 0 50 2 sqrt mul colors 9 concentric-rings
-% angle r V tU D
+% angle r V S D
45 [200] 20 100 50 rake
}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
@@ -1424,7 +1421,7 @@ actions={
\psline{->}(0,0)(!2 sqrt 2 sqrt neg)
\uput[45](0.707,-0.707){$r>0$}
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=red,linewidth=0.1]{->}(0,0)(1.8;45)}
-\rput(2.5,-0.9){\red tU}
+\rput(2.5,-0.9){\red S}
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture*}
\end{verbatim}}
@@ -1435,15 +1432,11 @@ actions={
\textbf{Example 3:} \verb+ 0 [11 100 0 tines] 50 100 30 rake+
-\begin{verbatim}
-[ cnt spacing ofst tines ]
+\mycmd{\texttt{[} $n$ $S$ $\Omega$}{tines} \texttt{]}
-cnt Number of teeth
-spacing Displacement between the teeth
-ofst Offset of the middle tooth
- to the left (negative),
- to the right (positive)
-\end{verbatim}
+The tines command and its arguments are replaced by a sequence of $n$
+numbers. The difference between adjacent numbers is $S$ and the center
+number is $\Omega$ when $n$ is odd and $S/2-\Omega$ when $n$ is even.
The angle is \texttt{angle=0}, means the direction of the stylus track is north.
@@ -1451,7 +1444,7 @@ The distance \texttt{[r]} is a list of 11 teeth: \texttt{[11 100 0 tines]} meani
The stylus velocity is given with \texttt{V=50} (in mm/s).
-The distance \texttt{tU=100} between the original points and the deformed points along the stylus track is set to positive (the deformation is made to the direction of the stylus track).
+The distance \texttt{S=100} between the original points and the deformed points along the stylus track is set to positive (the deformation is made to the direction of the stylus track).
The stylus parameter \texttt{D} (given in mm) is set to 30 mm.
@@ -1529,15 +1522,10 @@ actions={
\subsection{\texttt{stylus}}
-Parameters for \texttt{stylus}: \texttt{bx, by, ex, ey, V, D}
-\begin{verbatim}
-bx by ex ey V D stylus
+\mycmd{$x_b$ $y_b$ $x_e$ $y_e$ $V$ $D$}{stylus}
-bx, by Beginning of stroke
-ex, ey End of stroke
-V Stylus velocity in mm/s
-D Stylus diameter in mm. Make larger to affect paint farther away.
-\end{verbatim}
+Pulls a single tine of diameter $D$ from $x_b,y_b$ to $x_e,y_e$ at
+velocity $V$.
\textbf{Example 1:}
@@ -1625,24 +1613,19 @@ actions={
\subsection{\texttt{stir}}
-Consider a single stylus (a cylinder of diameter \texttt{D}) that is placed on the $y$-axis at a distance $r$ from the chosen center. In a circular motion, the artist rotates the stylus by an angle $\theta$. The angular velocity will influence the shape of the deformation. The direction of rotation is fixed by the sign of $\theta$. If $\theta>0$ the artist rotates clockwise \footnote{The sign of $r$ can also indicate the direction of rotation. If $r<0$ the direction of the rotation fixed by $\theta$ inverts.}.
-\begin{verbatim}
-cx cy [ r ] w th D stir
+\mycmd{$x$ $y$ \Rs $\omega$ $\theta$ $D$}{stir}
-cx, cy Center coordinates in mm.
-[ r ] List of radii in mm.
-w Angular velocity in degrees/s.
-th Angle displacement at tines in degrees (clockwise).
-D Tine diameter in mm.
-\end{verbatim}
+Pulls tines of diameter $D$ in circular tracks of radii \Rs (positive
+$R$ is clockwise) around location $x,y$ at angular velocity $\omega$.
+The maximum angle through which fluid is moved is $\theta$ degrees.
\medskip
-\textbf{Explanations for the key \texttt{th}:}
+\textbf{Explanations for the key $\theta$:}
Setting: \verb! 0 0 [ 350 ] 10 -70 10 stir !
-\textbf{All} points on the circle are rotated by \texttt{th=70}. There is \textbf{no} partial stir operation.
+\textbf{All} points on the circle are rotated by $\theta$=70. There is \textbf{no} partial stir operation.
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
\psgrid[subgriddiv=1,gridcolor=lightgray!10]
@@ -1869,16 +1852,12 @@ The artist turns from two different centers, changing the direction of rotation.
\subsection{\texttt{vortex}}
-\begin{verbatim}
-cx cy circ t vortex
-
-cx, cy Center coordinates in mm.
-circ Circulation (in mm^2/s) is a simple scale factor.
- Typical value: 30e3 mm^2/s.
-t Time after circulation impulse at center. As t gets very large, the
- whole surface returns to its original pattern, possibly with
- rigid rotation. Typical value 10 s.
-\end{verbatim}
+\mycmd{$x$ $y$ $\Gamma$ $t$}{vortex}
+
+Rotates fluid clockwise around location $x,y$ as would result from an
+impulse of circulation $\Gamma$ after time $t$. At small $t$ the
+rotational shear is concentrated close to the center. As time passes
+the shear propagates outward.
\texttt{/vortex} is modeled by a Lamb-Oseen vortex. We refer to the article written by Aubrey Jaffer:
\begin{center}
@@ -1886,13 +1865,13 @@ t Time after circulation impulse at center. As t gets very large, the
\end{center}
The documentation illustrates the used parameters:
-center coordinates in mm, circulation $\mathrm{mm}^2$/s and the time s.
+Center coordinates in mm, circulation $\mathrm{mm}^2$/s and the time s.
After a long enough time, the whole surface returns to its initial state. This can be easily proofed within an animation.
Here the animation code for the \texttt{animate} package by Alexander Grahn:
-\begin{minipage}[t]{10cm}\kern0pt
+\begin{minipage}[t]{11cm}\kern0pt
\begin{animateinline}[%
controls,loop,
begin={\begin{pspicture}(-5,-5)(5,5)},
@@ -1916,7 +1895,7 @@ Here the animation code for the \texttt{animate} package by Alexander Grahn:
}
\end{animateinline}
\end{minipage}
-\begin{minipage}[t]{8cm}\kern0pt
+\begin{minipage}[t]{7cm}\kern0pt
{\footnotesize\begin{verbatim}
\begin{document}
\begin{animateinline}[%
@@ -2045,62 +2024,91 @@ actions={
\newpage
-\subsection{\texttt{wiggle}}
+\subsection{\texttt{jiggle}}
-This instruction simulates the action of an artist who with the tip of the stylus draws undulations on the surface of the liquid.
+\mycmd{$\theta$ $\lambda$ $\Omega$ $A$ $B$}{jiggle}
-\texttt{wiggle} affects the whole tank. In order to trace a wiggly rake in part of the tank, wiggle, then rake in part of the tank, then unwiggle
-(\texttt{wiggle} with negative depth).
+Applies $\theta$-rotated elliptical wiggle with major axis length $A$ and minor axis length $B$, and repeat $\lambda$ in the $\theta$ direction, to the whole tank. Consider movement along the $\theta$-axis as a function of $a = 360\cdot \frac{x \sin(\theta) + y \cos(\theta) +\Omega}{\lambda}$. A point at $x,y$ is moved to:
+\begin{align*}
+x'&=x+\frac{1}{2}A\sin(a)\cdot\sin(\theta)-\frac{1}{2}B\cos(a)\cdot\cos(\theta),\\
+y'&=y+\frac{1}{2}A\sin(a)\cdot\cos(\theta)+\frac{1}{2}B\cos(a)\cdot\sin(\theta).
+\end{align*}
+For volume-preserving jiggles, use $A=0$.
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/How-To}
\end{center}
demonstrates this.
-\begin{verbatim}
-angle period ofst depth wiggle
-Applies sinsusoidal wiggle: y=depth*sin(360*x/period+ofst).
+\bigskip
-angle Wiggle will be perpendicular to angle from y-axis up.
-period Period of the sinusoidal wiggle (in degrees)
-depth Amplitude of the sinusoidal wiggle
-ofst Displacement of the sinusoidal wiggle (phase)
+\textbf{Example 1:}
-\end{verbatim}
-The direction is defined by the angle (we call it $\alpha=$ \texttt{angle}) with respect to the $y$-axis upwards; a positive value of $\alpha$ points clockwise.
-\texttt{(dx, dy)} represents the unit vector in the desired deformation direction, $(u_x=\cos\alpha, u_y=\sin\alpha)$.
-\[
-a=f(y u_x -xu_y)\Longrightarrow x'=x+au_x;\ y'=y+au_y
-\]
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+actions={%
+0 0 10 colors 48 concentric-rings
+0 200 -50 0 45 jiggle
+}](12,12)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+actions={%
+0 0 10 colors 48 concentric-rings
+0 200 -50 0 45 jiggle
+}](12,12)
+\end{pspicture}
+\end{verbatim}}
\newpage
-\textbf{Example 1:}
+\textbf{Example 2:}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+actions={%
+0 0 10 colors 48 concentric-rings
+0 200 -50 45 0 jiggle
+}](12,12)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+actions={%
+0 0 10 colors 48 concentric-rings
+0 200 -50 45 0 jiggle
+}](12,12)
+\end{pspicture}
+\end{verbatim}}
-If one wishes to obtain a sinusoidal undulation parallel to the axis $Oy$, we set $\alpha=0$. In this case $(u_x=1, u_y=0)$, and a function i. e., a sinusoidal function with amplitude 50 (\texttt{depth}) and angular velocity (\texttt{period}) $\omega=5$: $f(x,y)=50\sin(5y)$, we will have:
-$x'=x+50\sin(5y); \ y'=y$.
+\newpage
+
+
+\textbf{Example 3:}
-It is recalled that the coordinates are in mm. If on the interval $-500 <x <500 $ we want 5 \textit{periods}, we will take as angular velocity (\texttt{period}): $\omega=5\times 360/1000 = 1.8$ and as we want it in degrees, we multiply by 360: $1.8\times 360=648$
\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,bckg=false,
-linewidth=0.2,
- actions={
- 0 0 35 colors 33 concentric-rings
- -90 648 0 50 wiggle
- }](10,10)
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+actions={%
+0 0 10 colors 48 concentric-rings
+0 200 -50 45 45 jiggle
+}](12,12)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,bckg=false,
-linewidth=0.2,
- actions={
- 0 0 35 colors 33 concentric-rings
- -90 648 0 50 wiggle
- }](10,10)
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+actions={%
+0 0 10 colors 48 concentric-rings
+0 200 -50 45 45 jiggle
+}](12,12)
\end{pspicture}
\end{verbatim}}
@@ -2108,55 +2116,66 @@ linewidth=0.2,
\newpage
-\textbf{Example 2:}
+\subsection{\texttt{wriggle}}
+
+\mycmd{$x$ $y$ $\lambda$ $A$ $B$}{wriggle}
-For a sinusoidal undulation parallel to the axis $Ox$, we set $\alpha=90$. In that case $(u_x=0,u_y=1)$, the function becomes $f(x,y)=50\sin(5x)$, thus:
+{\tt wriggle} is to {\tt jiggle} as {\tt stir} is to {\tt rake}.
+Consider the tank as split into concentric rings around $x,y$. Where
+$r$ is the radial distance from $x,y$, rings are rotated by
+$0.5\,B\,\cos(360\,r/\lambda)$, and expanded and contracted
+$0.5\,A\,\sin(360\,r/\lambda)$. To prevent overlap
+$|\pi\,A|<|\lambda|$. There is no offset parameter. When
+$A/\lambda>0$, maximum compression is at $r$ equal to odd multiples of
+$0.5\,\lambda$; otherwise maximum compression is at integer multiples
+of $\lambda$.
+
+\textbf{Example 1:}
-$x'=x;\ y'=y+50\sin(5x)$.
\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,bckg=false,
-linewidth=0.2,
- actions={
- 0 0 35 colors 33 concentric-rings
- 0 648 0 50 wiggle
- }](10,10)
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+actions={
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 0 30 wriggle
+}
+](-6,-6)(6,6)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,bckg=false,
-linewidth=0.2,
- actions={
- 0 0 35 colors 33 concentric-rings
- 0 648 0 50 wiggle
- }](10,10)
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+actions={
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 0 30 wriggle
+}
+](-6,-6)(6,6)
\end{pspicture}
\end{verbatim}}
\newpage
+\textbf{Example 2:}
-\textbf{Example 3:}
-
-For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\mathrm{o}$ :
\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
+\begin{pspicture}(-6,-6)(6,6)
\psMarble[
- actions={
- 0 0 35 colors 33 concentric-rings
- 45 648 0 50 wiggle
- }](10,10)
+actions={
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 50 0 wriggle
+}
+](-6,-6)(6,6)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
+\begin{pspicture}(-6,-6)(6,6)
\psMarble[
- actions={
- 0 0 35 colors 33 concentric-rings
- 45 648 0 50 wiggle
- }](10,10)
+actions={
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 50 0 wriggle
+}
+](-6,-6)(6,6)
\end{pspicture}
\end{verbatim}}
@@ -2164,27 +2183,26 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
\newpage
-\textbf{Example 4:}
+\textbf{Example 3:}
-\textbf{Note:} These transformations can be combined and also be reversed, example:
\begin{center}
-\begin{pspicture}(-4,-4)(4,4)
+\begin{pspicture}(-6,-6)(6,6)
\psMarble[
actions={
-0 0 50 colors 25 concentric-rings
-0 1080 0 30 wiggle
-0 1080 0 -30 wiggle % reverse action
-}](8,8)
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 50 30 wriggle
+}
+](-6,-6)(6,6)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
-\begin{pspicture}(-4,-4)(4,4)
+\begin{pspicture}(-6,-6)(6,6)
\psMarble[
actions={
-0 0 50 colors 25 concentric-rings
-0 1080 0 30 wiggle
-0 1080 0 -30 wiggle % reverse action
-}](8,8)
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 50 30 wriggle
+}
+](-6,-6)(6,6)
\end{pspicture}
\end{verbatim}}
@@ -2194,13 +2212,10 @@ actions={
\subsection{\texttt{shift}}
-\begin{verbatim}
-angle rad shift
+\mycmd{$\theta$ $R$}{shift}
+
+Shifts tank by $R$ in direction $\theta$ degrees clockwise from upward.
-angle Angle from vertical (clockwise)
-rad Length of displacement vector
-\end{verbatim}
-The choice of units was made, so that 100 pts correspond to 1 cm within the image. \texttt{rad} is the length shifted.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=50,
@@ -2228,7 +2243,7 @@ actions={
\end{pspicture}
\end{center}
The displacement vector is given by its \texttt{angle} $\alpha$ and its length \texttt{rad} in pts.
-{\tiny\begin{verbatim}
+{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=50,
colors={
@@ -2259,26 +2274,87 @@ actions={
\newpage
+\subsection{\texttt{turn}}
+
+\mycmd{$x$ $y$ $\theta$}{turn}
+
+Turns tank around $x,y$ by $\theta$ degrees clockwise.
+
+\begin{center}
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[
+actions={
+ 0 0 13 colors 34 concentric-rings
+ 0 -150 [ -100 -300 ] 1 30 70 stir
+},
+](-3,-3)(3,3)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[
+actions={
+ 0 0 13 colors 34 concentric-rings
+ 0 -150 [ -100 -300 ] 1 30 70 stir
+},
+](-3,-3)(3,3)
+\end{pspicture}
+\end{verbatim}}
+
+\begin{center}
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[
+actions={
+ 0 0 13 colors 34 concentric-rings
+ 0 -150 [ -100 -300 ] 1 30 70 stir
+ 0 0 90 turn
+},
+](-3,-3)(3,3)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[
+actions={
+ 0 0 13 colors 34 concentric-rings
+ 0 -150 [ -100 -300 ] 1 30 70 stir
+ 0 0 90 turn
+},
+](-3,-3)(3,3)
+\end{pspicture}
+\end{verbatim}}
+
+
+\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 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 $R_d$.
Spray commands are performed after marbling!
+\subsection{\texttt{normal-spray}}
-\subsection{\texttt{Gaussian-spray}}
+\mycmd{$x$ $y$ $L_\perp$ $L_\parallel$ $\theta$ \rgbs $n$ $R_d$}{normal-spray}
+
+Places $n$ drops of colors \rgbs of radius $R_d$ randomly in a
+circular or elliptical disk centered at $x,y$ having diameters
+$L_\perp$ and $L_\parallel$ respectively perpendicular and parallel to
+$\theta$ degrees clockwise from upward. For a circular disk
+($R=L_\parallel/2=L_\perp/2$), 63\,\% of drops are within radius $R$,
+87\,\% of drops are within $R\,\sqrt{2}$, and 98\,\% of drops are
+within radius $2\,R$.
-\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
+colors={[0.95 0.95 0.95]},
+spractions={
+0 0 250 250 0 [0.3 0 0.5] 1000 2 normal-spray
}](11,11)
\pscircle[linecolor=red,linestyle=dashed](0,0){2.5}
\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 mul}
@@ -2288,9 +2364,9 @@ Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a circular or ellip
{\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
+colors={[0.95 0.95 0.95]},
+spractions={
+0 0 250 250 0 [0.3 0 0.5] 1000 2 normal-spray
}](11,11)
\pscircle[linecolor=red,linestyle=dashed](0,0){2.5}
\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 mul}
@@ -2304,10 +2380,11 @@ Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a circular or ellip
\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.
+\mycmd{$x$ $y$ $L_\perp$ $L_\parallel$ $\theta$ \rgbs $n$ $R_d$}{uniform-spray}
+
+Places $n$ drops of colors \rgbs of radius $R_d$ randomly in a $L_\perp$
+by $L_\parallel$ rectangle centered at location $x,y$ and rotated by $\theta$
+degrees clockwise from upward.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
@@ -2334,11 +2411,292 @@ Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a \texttt{xsid} by
\newpage
+\section{Shadings}
+
+Shadings commands simulate the lightening and darkening of paint transferred to paper caused by pulling the paper from the bath at uneven rates. Shading is always performed for \texttt{spractions}, but only when \texttt{oversample}$>0$ for \texttt{actions}. Shading commands are placed within the braces of the \texttt{shadings=\{\}} parameter.
+
+\subsection{\texttt{jiggle-shade}}
+
+\mycmd{$\theta$ $\lambda$ $\Omega$ $A_s$}{jiggle-shade}
+
+Applies darkening and lightening resulting from the squeezing and expansion of a {\tt jiggle} command sharing its first four arguments: ``$\theta~\lambda~\Omega~A~B$~{\tt jiggle}''. $A_s$ does not need to equal $A$ from the {\tt jiggle} command. When $A_s$ is closer to zero, shading will be softer; when $A_s$ is further from zero, shading will be darker. As with $A$ in the {\tt jiggle} command, realistic shading requires $|\pi\,A_s|<|\lambda|$.
+
+\textbf{Example 1:}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[%
+oversample=1,
+actions={%
+0 0 20 colors 40 concentric-rings
+-30 200 180 45 45 jiggle
+},
+shadings={
+-30 200 0 63.5 jiggle-shade
+}](12,12)
+\end{pspicture}
+\end{center}
+{\footnotesize\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[oversample=1,
+actions={%
+0 0 20 colors 40 concentric-rings
+-30 200 180 45 45 jiggle
+},
+shadings={
+-30 200 0 63.5 jiggle-shade
+}](12,12)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 2:}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+oversample=1,
+actions={
+0 0 20 colors 40 concentric-rings
+-30 300 0 -75 -75 jiggle
+60 300 0 -75 -75 jiggle
+},
+shadings={
+-30 300 0 -75 jiggle-shade
+60 300 0 -75 jiggle-shade
+}](-6,-6)(6,6)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+oversample=1,
+actions={
+0 0 20 colors 40 concentric-rings
+-30 300 0 -75 -75 jiggle
+60 300 0 -75 -75 jiggle
+},
+shadings={
+-30 300 0 -75 jiggle-shade
+60 300 0 -75 jiggle-shade
+}](-6,-6)(6,6)
+\end{pspicture}
+\end{verbatim}
+
+
+\newpage
+
+
+\subsection{\texttt{wriggle-shade}}
+
+\mycmd{$x$ $y$ $\lambda$ $\Omega$ $A_s$}{wriggle-shade}
+
+Applies darkening and lightening resulting from the squeezing and
+expansion of a {\tt wriggle} command sharing its first three
+arguments. Unlike {\tt wriggle}, {\tt wriggle-shade} takes an offset
+argument $\Omega$. $A_s$ does not need to equal $A$ from the {\tt
+ wriggle} command. When $A_s$ is closer to zero, shading will be
+softer; when $A_s$ is further from zero, shading will be darker. As
+with $A$ in the {\tt wriggle} command, realistic shading requires
+$|\pi\,A_s|<|\lambda|$. When $A/\lambda>0$ and $\Omega=0$, the
+darkest rings are at $r$ equal to odd multiples of $0.5\,\lambda$;
+otherwise the darkest rings are at integer multiples of $\lambda$ and
+there is a dark spot at $x,y$.
+
+\textbf{Example 1:}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+actions={
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 50 30 wriggle
+},
+oversample=1.5,
+shadings={
+ 0 -250 200 0 50 wriggle-shade
+}
+](-6,-6)(6,6)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+actions={
+ 0 0 10 colors 44 concentric-rings
+ 0 -250 200 50 30 wriggle
+},
+oversample=1.5,
+shadings={
+ 0 -250 200 0 50 wriggle-shade
+}
+](-6,-6)(6,6)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 2:}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+oversample=1.5,
+actions={
+ 0 0 10 colors 44 concentric-rings
+ % 0 -250 200 50 30 wriggle
+ 0 -250 [ -100 -300 -500 -700 ] 1 30 70 stir
+ 0 -250 20 turn
+},
+shadings={
+ 0 -250 200 0 50 wriggle-shade
+}
+](-6,-6)(6,6)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+\psMarble[
+oversample=1.5,
+actions={
+ 0 0 10 colors 44 concentric-rings
+ % 0 -250 200 50 30 wriggle
+ 0 -250 [ -100 -300 -500 -700 ] 1 30 70 stir
+ 0 -250 20 turn
+},
+shadings={
+ 0 -250 200 0 50 wriggle-shade
+}
+](-6,-6)(6,6)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\subsection{\texttt{tint} and \texttt{shade}}
+
+\mycmd{\rgb $\gamma$}{tint}
+
+Returns the \rgb color as modified by $\gamma$. $0<\gamma<1$ darkens
+the color; $1<\gamma$ lightens the color; and $\gamma=1$ leaves it
+unchanged.
+
+\bigskip
+
+\mycmd{\rgb $\gamma$}{shade}
+
+Returns the \rgb color as modified by $\gamma$. $0<\gamma<1$ lightens the color; $1<\gamma$ darkens the color; and $\gamma=1$ leaves it unchanged.
+
+\bigskip
+
+\textbf{Example:} \texttt{tint} and \texttt{shade} chart.
+
+Tints are the left half: $\gamma$ runs from 0.2 at the center to 1.8 at the left edge. \\
+Shades are the right half: $\gamma$ runs from 0.2 at the center to 1.8 at the right edge.
+
+\begin{center}
+\begin{pspicture}(-4,-4)(4,4)
+\psMarble[
+oversample=1,
+actions={
+ /idy 375 def
+ colors
+ {
+ /clr exch def
+ -220 idy .025 mul add idy -90 [ 9 45 idy .0025 mul sub 0 tines ]
+ [ .2 .2 1.80001 { clr exch tint } for ] 20 line-drops
+ 220 idy .025 mul sub idy 90 [ 9 45 idy .0025 mul sub 0 tines ]
+ [ .2 .2 1.80001 { clr exch shade } for ] 20 line-drops
+ /idy idy 90 sub def
+ } forall
+}](8,8)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-4,-4)(4,4)
+\psMarble[
+oversample=1,
+actions={
+ /idy 375 def
+ colors
+ {
+ /clr exch def
+ -220 idy .025 mul add idy -90 [ 9 45 idy .0025 mul sub 0 tines ]
+ [ .2 .2 1.80001 { clr exch tint } for ] 20 line-drops
+ 220 idy .025 mul sub idy 90 [ 9 45 idy .0025 mul sub 0 tines ]
+ [ .2 .2 1.80001 { clr exch shade } for ] 20 line-drops
+ /idy idy 90 sub def
+ } forall
+}](8,8)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\subsection{\texttt{edgy-color}}
+
+\mycmd{\rgb $\zeta$}{edgy-color}
+
+Returns the \rgb color flagged so that in raster rendering the
+boundary of each drop of that color is lightened while its center is
+darkened. Where $a$ is the point's initial distance from the drop
+center and $r$ is the drop's initial radius, the effective
+$\gamma~=~\exp\left(\zeta\,a^2/r^2\right)\,{(\exp(\zeta)-1)/(\zeta\exp(\zeta))}$.
+When $\zeta=0$, $\gamma=1$ and the drop is uniformly shaded.
+
+\begin{pspicture}(-3,-3)(3,3)
+ \psMarble[
+ background={
+ [ 118 118 118 ]
+ },
+ colors={
+ [ 118 118 118 ]
+ },
+ viscosity=1000,
+ oversample=2,
+ actions={
+ 0 0 500 dup 0 colors 0 get 1.75 edgy-color 25 100 uniform-drops
+ 0 0 900 dup 0 [ colors 0 get 1.75 edgy-color ] 50 71 uniform-drops
+ }
+ ](6,6)
+\end{pspicture}
+{\small\begin{verbatim}
+\begin{pspicture}(-3,-3)(3,3)
+ \psMarble[
+ background={
+ [ 118 118 118 ]
+ },
+ colors={
+ [ 118 118 118 ]
+ },
+ viscosity=1000,
+ oversample=2,
+ actions={
+ 0 0 500 dup 0 colors 0 get 1.75 edgy-color 25 100 uniform-drops
+ 0 0 900 dup 0 [ colors 0 get 1.75 edgy-color ] 50 71 uniform-drops
+ }
+ ](6,6)
+\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).
-\textbf{Example 1:}
+\textbf{Example 1}
\begin{center}
\begin{pspicture*}(-4,-1)(4,12)
@@ -2357,7 +2715,7 @@ actions={
{/idx exch def
-270 idx sub -30 idx 2 mul add [-270 idx 3 mul sub] 10 90 50 stir
} for
-0 720 0 10 wiggle
+0 720 0 10 20 jiggle
}](8,24)
\end{pspicture*}
\end{center}
@@ -2378,7 +2736,7 @@ actions={
{/idx exch def
-270 idx sub -30 idx 2 mul add [-270 idx 3 mul sub] 10 90 50 stir
} for
-0 720 0 10 wiggle
+0 720 0 10 10 jiggle
}](8,24)
\end{pspicture*}
\end{verbatim}}
@@ -2387,7 +2745,7 @@ actions={
\newpage
-\textbf{Example 2:}
+\textbf{Example 2}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
@@ -2444,7 +2802,7 @@ actions={
\newpage
-\textbf{Example 3:}
+\textbf{Example 3}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
@@ -2471,7 +2829,7 @@ actions={
\newpage
-\textbf{Example 4:}
+\textbf{Example 4}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
@@ -2520,7 +2878,7 @@ actions={
\newpage
-\textbf{Example 5:}
+\textbf{Example 5}
\begin{center}
\newpsstyle{YellowGlass}{linecolor=gray,linewidth=0.1}
@@ -2589,7 +2947,7 @@ LensStyleGlass=YellowGlass](1,-1){
\newpage
-\textbf{Example 6:}
+\textbf{Example 6}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
@@ -2650,7 +3008,7 @@ actions={
\newpage
-\textbf{Example 7:}
+\textbf{Example 7}
\begin{center}
\begin{pspicture}(-6,-6)(6,6)
@@ -2693,7 +3051,7 @@ actions={
\newpage
-\textbf{Example 8:}
+\textbf{Example 8}
\begin{center}
\begin{pspicture}(-7.5,-8)(7.5,8)
@@ -2720,7 +3078,7 @@ actions={
\newpage
-\textbf{Example 9:}
+\textbf{Example 9: Contours}
\begin{minipage}[t]{10cm}\kern0pt
@@ -2840,14 +3198,12 @@ actions={
\newpage
-\textbf{Example 10:}
+\textbf{Example 10: Latte}
\begin{center}
\begin{pspicture}(-6,-6)(6,6)
\psMarble[
- background={
- [0.1 0 0.1]
- },
+ background={[0.1 0 0.1]},
colors={(e7cc9b)(c28847)(80410b)},
viscosity=1000,
actions={
@@ -2856,7 +3212,7 @@ actions={
0 0 150 [ .8 .9 .8 ] drop
0 0 150 [ .9 .9 .8 ] drop
0 0 500 colors 2 get drop
- 0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
+ 0 0 566 dup 0 colors 1 get 30 30 normal-drops
0 0 -50e3 100 vortex
%% tulip
0 -250 30 colors 1 get drop
@@ -2880,7 +3236,7 @@ actions={
-300 200 300 350 20 30 stylus
},
spractions={
- 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray
+ 0 0 300 300 0 [0.3 0.15 0.1] 1000 1.7 normal-spray
}
](12,12)
\end{pspicture}
@@ -2888,9 +3244,7 @@ actions={
{\tiny\begin{verbatim}
\begin{pspicture}(-6,-6)(6,6)
\psMarble[
- background={
- [0.1 0 0.1]
- },
+ background={[0.1 0 0.1]},
colors={(e7cc9b)(c28847)(80410b)},
viscosity=1000,
actions={
@@ -2899,7 +3253,7 @@ actions={
0 0 150 [ .8 .9 .8 ] drop
0 0 150 [ .9 .9 .8 ] drop
0 0 500 colors 2 get drop
- 0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
+ 0 0 566 dup 0 colors 1 get 30 30 normal-drops
0 0 -50e3 100 vortex
%% tulip
0 -250 30 colors 1 get drop
@@ -2923,7 +3277,7 @@ actions={
-300 200 300 350 20 30 stylus
},
spractions={
- 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray
+ 0 0 300 300 0 [0.3 0.15 0.1] 1000 1.7 normal-spray
}
](12,12)
\end{pspicture}
@@ -2933,7 +3287,7 @@ actions={
\newpage
-\textbf{Example 11}
+\textbf{Example 11: Nonpareil}
\begin{center}
\begin{pspicture}(-6,-6)(6,6)
@@ -2980,7 +3334,70 @@ actions={
\newpage
-\textbf{Example 12}
+\textbf{Example 12: Rollers}
+
+\begin{center}
+\includegraphics{Rollers.eps}
+%\begin{pspicture}(-6,-6)(6,6)
+% \psMarble[
+% background={
+% [64 64 64]
+% },
+% colors={
+% [0.275 0.569 0.796][0.965 0.882 0.302]
+% [0.176 0.353 0.129][0.635 0.008 0.094]
+% [0.078 0.165 0.518][0.824 0.592 0.031]
+% [0.059 0.522 0.392][0.816 0.333 0.475]
+% [0.365 0.153 0.435][0.624 0.588 0.439]
+% },
+% viscosity=1000,
+% oversample=1.5,
+% actions={
+% 0 0 48 colors 25 concentric-rings
+% 90 [-150 450] 100 750 31 rake
+% -90 [-150 450] 100 750 31 rake
+% 180 [ 25 50 0 tines ] 30 200 31 rake
+% 0 230 shift
+% -40 400 0 90 90 jiggle
+% },
+% shadings={
+% -40 400 0 90 jiggle-shade
+% }
+% ](-6,-6)(6,6)
+%\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={[64 64 64]},
+ colors={
+ [0.275 0.569 0.796][0.965 0.882 0.302]
+ [0.176 0.353 0.129][0.635 0.008 0.094]
+ [0.078 0.165 0.518][0.824 0.592 0.031]
+ [0.059 0.522 0.392][0.816 0.333 0.475]
+ [0.365 0.153 0.435][0.624 0.588 0.439]
+ },
+ viscosity=1000,oversample=1.5,
+ actions={
+ 0 0 48 colors 25 concentric-rings
+ 90 [-150 450] 100 750 31 rake
+ -90 [-150 450] 100 750 31 rake
+ 180 [ 25 50 0 tines ] 30 200 31 rake
+ 0 230 shift
+ -40 400 0 90 90 jiggle
+ },
+ shadings={
+ -40 400 0 90 jiggle-shade
+ }
+ ](-6,-6)(6,6)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 13: French Curl}
\begin{center}
\begin{pspicture}(-6,-6)(6,6)
@@ -2993,6 +3410,7 @@ actions={
[ 53 97 122 ]
[ 128 78 46 ]
},
+ oversample=1,
actions={
0 0 1000 1000 0 [ 222 186 149 ] 85 1.72 10 mul uniform-drops
0 0 1000 1000 0 colors 250 1.72 16 mul uniform-drops
@@ -3015,6 +3433,7 @@ actions={
[ 53 97 122 ]
[ 128 78 46 ]
},
+ oversample=1,
actions={
0 0 1000 1000 0 [ 222 186 149 ] 85 1.72 10 mul uniform-drops
0 0 1000 1000 0 colors 250 1.72 16 mul uniform-drops
@@ -3025,13 +3444,216 @@ actions={
}
](12,12)
\end{pspicture}
-\end{verbatim}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 14: Spanish Wave}
+
+\begin{center}
+\includegraphics{Wave.eps}
+%\begin{pspicture}(-6,-6)(6,6)
+% \psMarble[
+% background={
+% [ 125 53 78 ]
+% },
+% colors={
+% [ 81 118 118 ]
+% [ 232 196 89 ]
+% },
+% viscosity=1000,
+% oversample=1,
+% actions={
+% 0 0 800 800 0 colors 1 get 120 25 uniform-drops
+% 90 [ 10 100 25 tines ] 40 200 31 rake
+% -90 185 shift
+% 0 [ 10 100 25 tines ] 40 200 31 rake
+% 180 185 shift
+% -90 [10 100 25 tines ] 40 200 31 rake
+% 90 185 shift
+% 180 [10 100 25 tines ] 40 200 31 rake
+% 0 185 shift
+% 0 0 1000 1000 0 [ colors 0 get dup 0.9 shade ] 110 50 uniform-drops
+% -51 120 0 -25 -10 jiggle
+% -49 93 37 -30 -12 jiggle
+% },
+% shadings={
+% -51 120 0 -10 jiggle-shade
+% -49 93 37 -12 jiggle-shade
+% },
+% spractions={
+% 0 0 1000 1000 0 [ colors 0 get 1.3 shade ] 1000 1.5 uniform-spray
+% }
+% ](12,12)
+%\end{pspicture}
+\end{center}
+{\tiny\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 125 53 78 ]
+ },
+ colors={
+ [ 81 118 118 ]
+ [ 232 196 89 ]
+ },
+ viscosity=1000,
+ oversample=1,
+ actions={
+ 0 0 800 800 0 colors 1 get 120 25 uniform-drops
+ 90 [ 10 100 25 tines ] 40 200 31 rake
+ -90 185 shift
+ 0 [ 10 100 25 tines ] 40 200 31 rake
+ 180 185 shift
+ -90 [10 100 25 tines ] 40 200 31 rake
+ 90 185 shift
+ 180 [10 100 25 tines ] 40 200 31 rake
+ 0 185 shift
+ 0 0 1000 1000 0 [ colors 0 get dup 0.9 shade ] 110 50 uniform-drops
+ -51 120 0 -25 -10 jiggle
+ -49 93 37 -30 -12 jiggle
+ },
+ shadings={
+ -51 120 0 -10 jiggle-shade
+ -49 93 37 -12 jiggle-shade
+ },
+ spractions={
+ 0 0 1000 1000 0 [ colors 0 get 1.3 shade ] 1000 1.5 uniform-spray
+ }
+ ](12,12)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 15: Nautilus}
+
+\begin{center}
+\includegraphics{Nautilus.eps}
+%\begin{pspicture}(-6,-6)(6,6)
+% \psMarble[
+% colors={
+% [0.20 0.10 0.02]
+% [0.72 0.49 0.41]
+% },
+% viscosity=1000,
+% oversample=2,
+% actions={
+% 0 0 384 colors 1 get drop
+% -192 0 288 colors 0 get drop
+% -192 0 144 colors 1 get drop
+% -192 0 56 colors 0 get drop
+% 180 [ -480 80 480 {} for ] 4 150 50 rake
+% 0 [ -520 80 520 {} for ] 4 150 50 rake
+% -90 [ -480 80 480 {} for ] 4 150 50 rake
+% 90 [ -520 80 520 {} for ] 4 150 50 rake
+% 0 0 [ 75 150 225 300 375 ] 4 -120 50 stir
+% 0 0 -15 turn
+% },
+% shadings={
+% 0 0 -75 0 20 wriggle-shade
+% }
+% ](12,12)
+%\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ colors={
+ [0.20 0.10 0.02]
+ [0.72 0.49 0.41]
+ },
+ viscosity=1000,
+ oversample=2,
+ actions={
+ 0 0 384 colors 1 get drop
+ -192 0 288 colors 0 get drop
+ -192 0 144 colors 1 get drop
+ -192 0 56 colors 0 get drop
+ 180 [ -480 80 480 {} for ] 4 150 50 rake
+ 0 [ -520 80 520 {} for ] 4 150 50 rake
+ -90 [ -480 80 480 {} for ] 4 150 50 rake
+ 90 [ -520 80 520 {} for ] 4 150 50 rake
+ 0 0 [ 75 150 225 300 375 ] 4 -120 50 stir
+ 0 0 -15 turn
+ },
+ shadings={
+ 0 0 -75 0 20 wriggle-shade
+ }
+ ](12,12)
+\end{pspicture}
+\end{verbatim}}
\newpage
-\textbf{Example 13: Blendmodes}
+\textbf{Example 16: Moire}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 0 0 0 ]
+ },
+ paper={
+ [ 0 0 0 ]
+ },
+ colors={
+ [ 245 245 245 ]
+ [ 31 133 241 ]
+ [ 248 159 241 ]
+ },
+ viscosity=1000,
+ oversample=1,
+ actions={
+ 0 0 850 850 0 colors 0 get 150 20 uniform-drops
+ 0 0 950 950 0 colors 1 get 150 20 uniform-drops
+ 0 0 1050 1050 0 colors 2 get 150 20 uniform-drops
+ 0 -1000 300 95 1 wriggle
+ },
+ shadings={
+ 0 -1000 300 0 90 wriggle-shade
+ }
+ ](12,12)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 0 0 0 ]
+ },
+ paper={
+ [ 0 0 0 ]
+ },
+ colors={
+ [ 245 245 245 ]
+ [ 31 133 241 ]
+ [ 248 159 241 ]
+ },
+ viscosity=1000,
+ oversample=1,
+ actions={
+ 0 0 850 850 0 colors 0 get 150 20 uniform-drops
+ 0 0 950 950 0 colors 1 get 150 20 uniform-drops
+ 0 0 1050 1050 0 colors 2 get 150 20 uniform-drops
+ 0 -1000 300 95 1 wriggle
+ },
+ shadings={
+ 0 -1000 300 0 90 wriggle-shade
+ }
+ ](12,12)
+\end{pspicture}
+\end{verbatim}}
+
+
+
+\textbf{Example 17: Blendmodes}
In case one want to overlap various marblings one can use the following blendmodes (basic option in PSTricks):
@@ -3071,9 +3693,9 @@ Just set
}
\psMarble[viscosity=1000,
actions={
-0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
-0 0 200 0 1 [0.7 0.5 0] 50 20 Gaussian-drops
-0 0 300 0 1 [0 0 0.5] 15 75 Gaussian-drops
+0 0 400 400 0 [1 0 0] 10 25 normal-drops
+0 0 400 400 0 [0.7 0.5 0] 50 20 normal-drops
+0 0 400 400 0 [0 0 0.5] 15 36 normal-drops
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
@@ -3092,9 +3714,9 @@ actions={
\begin{pspicture}(-4,-4)(4,4)
\psMarble[blendmode=5,shapealpha=1,viscosity=1000,
actions={
-0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
-0 0 200 0 1 [0.7 0.5 0] 50 20 Gaussian-drops
-0 0 300 0 1 [0 0 0.5] 15 75 Gaussian-drops
+0 0 400 400 0 [1 0 0] 10 25 normal-drops
+0 0 400 400 0 [0.7 0.5 0] 50 20 normal-drops
+0 0 400 400 0 [0 0 0.5] 15 36 normal-drops
}](8,8)
\psMarble[blendmode=5,shapealpha=1,viscosity=1000,bckg=false,
actions={
@@ -3114,7 +3736,7 @@ actions={
\newpage
-\textbf{Example 14: Transparency}
+\textbf{Example 18: Transparency}
In case one want to overlap various marblings one can also use transparency, which is a basic option in PSTricks \texttt{opacity=}. Just set
\begin{verbatim}
@@ -3136,9 +3758,9 @@ The values need to be from 0 to 1.
}
\psMarble[viscosity=1000,
actions={
-0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
-0 0 200 0 1 [0 1 0] 50 20 Gaussian-drops
-0 0 300 0 1 [0 0 1] 15 75 Gaussian-drops
+0 0 400 400 0 [1 0 0] 10 25 normal-drops
+0 0 400 400 0 [0.7 0.5 0] 50 20 normal-drops
+0 0 400 400 0 [0 0 0.5] 15 36 normal-drops
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
@@ -3160,9 +3782,9 @@ actions={
\begin{pspicture}(-4,-4)(4,4)
\psMarble[opacity=0.35,viscosity=1000,
actions={
-0 0 200 0 1 [1 0 0] 10 50 Gaussian-drops
-0 0 200 0 1 [0 1 0] 50 20 Gaussian-drops
-0 0 300 0 1 [0 0 1] 15 75 Gaussian-drops
+0 0 400 400 0 [1 0 0] 10 25 normal-drops
+0 0 400 400 0 [0.7 0.5 0] 50 20 normal-drops
+0 0 400 400 0 [0 0 0.5] 15 36 normal-drops
}](8,8)
\psMarble[opacity=0.35,viscosity=1000,bckg=false,
actions={