summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex187
1 files changed, 163 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
index 429780a9a71..3273cea1adf 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
+++ b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
@@ -1,10 +1,10 @@
-% pdflatex -interaction nonstopmode pst-marble-commands.tex
+% pdflatex -interaction nonstopmode pst-marble-commands-v1.4.tex
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{xcolor}
\usepackage{hyperref}
-%\documentclass[%
+%\documentclass[
% 11pt,
% english,
% BCOR10mm,
@@ -23,11 +23,20 @@
\pagestyle{empty}
-\newcommand\myMarble[2]{%
+\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}}
}
@@ -39,56 +48,164 @@
\begin{document}
-\section*{PST-marble Commands}
+\url{http://people.csail.mit.edu/jaffer/Marbling/pst-marble-commands-v1.4.pdf}
-\url{http://people.csail.mit.edu/jaffer/Marbling/pst-marble-commands.pdf}
+\section*{PST-marble Commands and Parameters}
\subsection*{Colors}
RGB colors can be specified in three formats:
-\myMarble{\texttt{[ 0.906 0.8 0.608 ]}}{}
+\mycmd{\texttt{[ 0.906 0.8 0.608 ]}}{}
Red, green, and blue color components between 0 and 1 in square
brackets.
-\myMarble{\texttt{[ 231 204 155 ]}}{}
+\mycmd{\texttt{[ 231 204 155 ]}}{}
Red, green, and blue color components between 0 and 255 in square
brackets.
-\myMarble{\texttt{(e7cc9b)}}{}
+\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:
+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]]}}{}
+
+\subsection*{Parameters}
+
+\texttt{{\char`\\}psMarble[}
+ \textit{parameter-assignment}\texttt{,}
+ \dots{}\texttt{,}
+ \textit{parameter-assignment}
+ \texttt{](}\textit{width}\texttt{,}\textit{height}\texttt{)}
+
+\texttt{{\char`\\}psMarble[}
+ \textit{parameter-assignment}\texttt{,}
+ \dots{}\texttt{,}
+ \textit{parameter-assignment}
+ \texttt{]($x-$,$y-$)($x+$,$y+$)}
+
+\medskip
+The comma separated parameter assignments are part of the
+\texttt{{\char`\\}psMarble} command. In the list below, the default
+value for each parameter is shown to the right of the parameter name.
+Note that the values assigned to \texttt{background=},
+\texttt{colors=}, \texttt{seed=}, \texttt{actions=}, and
+\texttt{spractions=} must be enclosed in curly braces
+\texttt{{\char`\{}{\char`\}}}.
+
+\myparamb{background}{[0~0~0]}
+
+Specifies the color for regions where paint has not been dropped (or
+moved to).
+
+\myparam{bckg}{true}
+
+When \texttt{bckg=false} the background color is not shown.
+
+\myparamb{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]
+}
+
+Specifies a color sequence accessible in paint-dropping commands as
+\texttt{colors}.
+
+\myparam{drawcontours}{false}
+
+When \texttt{drawcontours=true} paint contours are drawn with lines;
+when \texttt{drawcontours=false} contours are filled;
+
+\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.
+
+\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, new for version 1.4.
+
+\myparamb{seed}{Mathematical Marbling}
+
+Specifies the random seed used for \texttt{Gaussian-drops} and
+\texttt{uniform-drops} commands. Changing the \texttt{seed} value
+changes the positions of all drops from the \texttt{Gaussian-drops}
+and \texttt{uniform-drops} commands.
-\myMarble{\texttt{[(c28847) [231 204 155] [0.635 0.008 0.094]]}}{}
+\myparam{viscosity}{1000}
+Specifies the overall kinetic viscosity of the virtual tank fluid.
+Its units are $\rm{mm^2/s}$; the default value of 1000, which is 1000
+times more viscous than water, is a typical value for marbling.
+Increasing \texttt{viscosity} reduces the fluid movement far from the
+tines.
+
+\myparamb{actions}{0 0 36 colors 35 concentric-rings}
+
+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.
+
+\myparamb{spractions}{}
+
+Specifies the sequence of spray commands to perform. Spray commands
+are performed after marbling.
+
+\newpage
\subsection*{Dropping Paint}
-\myMarble{$x$ $y$ $R_d$ \rgb}{drop}
+\mycmd{$x$ $y$ $R_d$ \rgb}{drop}
Places a drop of color \rgb and radius $R_d$ centered at location
$x,y$.
-\myMarble{$x$ $y$ $R_i$ \rgbs $n$}{concentric-rings}
+\mycmd{$x$ $y$ $R_i$ \rgbs $n$}{concentric-rings}
Places $n$ rings in color sequence \rgbs centered at location $x,y$,
each ring having thickness $R_i$.
-\myMarble{$x$ $y$ $\theta$ \Rs \rgbs $R_d$}{line-drops}
+\mycmd{$x$ $y$ $\theta$ \Rs \rgbs $R_d$}{line-drops}
Places drops of colors \rgbs (in sequence) of radius $R_d$ in
a line through $x,y$ at $\theta$ degrees clockwise from vertical
at distances \Rs from $x,y$.
-\myMarble{$x$ $y$ $R$ $\theta$ $S$ $\delta$ \rgbs $n$ $R_d$}{coil-drops}
+\mycmd{$x$ $y$ {\texttt{[}$\Omega_x$~...\texttt{]} } {\texttt{[}$\Omega_y$~...\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_x \times \Omega_y$ centered at location $x,y$ and
+rotated by $\theta$ degrees clockwise from vertical. Orders of
+$\Omega_x$ and $\Omega_y$ matter.
+
+\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$
@@ -96,7 +213,7 @@ and $\theta$ degrees clockwise from vertical,
moving $S$ along the arc and incrementing the arc radius
by $\delta$ after each drop.
-\myMarble{$x$ $y$ $R$ $\theta$ $\epsilon$ \rgbs $n$ $R_d$}{Gaussian-drops}
+\mycmd{$x$ $y$ $R$ $\theta$ $\epsilon$ \rgbs $n$ $R_d$}{Gaussian-drops}
Places $n$ drops of colors \rgbs of radius $R_d$ randomly in a
circular or elliptical disk centered at $x,y$ having mean radius $R$,
@@ -105,7 +222,7 @@ $\epsilon$. 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 $2\,R$.
-\myMarble{$x$ $y$ $L_x$ $L_y$ $\theta$ \rgbs $n$ $R_d$}{uniform-drops}
+\mycmd{$x$ $y$ $L_x$ $L_y$ $\theta$ \rgbs $n$ $R_d$}{uniform-drops}
Places $n$ drops of colors \rgbs of radius $R_d$ randomly in a $L_x$
by $L_y$ rectangle centered at location $x,y$ and rotated by $\theta$
@@ -113,45 +230,67 @@ degrees clockwise from vertical.
\subsection*{Deformations}
-\myMarble{$\theta$ \Rs $V$ $S$ $D$}{rake}
+\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.
-\myMarble{$x_b$ $y_b$ $x_e$ $y_e$ $V$ $D$}{stylus}
+\mycmd{$x_b$ $y_b$ $x_e$ $y_e$ $V$ $D$}{stylus}
Pulls a single tine of diameter $D$ from $x_b,y_b$ to $x_e,y_e$ at
velocity $V$. Legacy \texttt{stroke} also works.
-\myMarble{$x$ $y$ \Rs $\omega$ $\theta$ $D$}{stir}
+\mycmd{$x$ $y$ \Rs $\omega$ $\theta$ $D$}{stir}
Pulls tines of diameter $D$ in circular tracks of radii \Rs (negative
$R$ is counterclockwise) around location $x,y$ at angular velocity
$\omega$. The maximum angle through which fluid is moved is $\theta$
degrees.
-\myMarble{$x$ $y$ $\Gamma$ $t$}{vortex}
+\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.
-\myMarble{$\theta$ $\lambda$ $\Omega$ $S$}{wiggle}
+\mycmd{$\theta$ $\lambda$ $\Omega$ $S$}{wiggle}
Applies sinsusoidal wiggle with period $\lambda$ and maximum
displacement $S$ to whole tank. With $\theta=0$, a point at $x,y$ is
moved to $x+S\,\sin(360\,y/\lambda+\Omega),y$.
-\myMarble{$\theta$ $R$}{shift}
+\mycmd{$\theta$ $R$}{shift}
Shifts tank by $R$ at $\theta$ degrees clockwise from vertical.
-\myMarble{\texttt{[} $n$ $S$ $\Omega$}{tines} \texttt{]}
+\mycmd{\texttt{[} $n$ $S$ $\Omega$}{tines} \texttt{]}
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.
+
+\subsection*{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 $R_d$.
+
+\mycmd{$x$ $y$ $R$ $\theta$ $\epsilon$ \rgbs $n$ $R_d$}{Gaussian-spray}
+
+Places $n$ drops of colors \rgbs randomly in a circular or elliptical
+disk centered at $x,y$ having mean radius $R$, $\theta$ degrees
+clockwise from vertical, and length-to-width ratio $\epsilon$. 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
+$2\,R$.
+
+\mycmd{$x$ $y$ $L_x$ $L_y$ $\theta$ \rgbs $n$ $R_d$}{uniform-spray}
+
+Places $n$ drops of colors \rgbs randomly in a $L_x$ by $L_y$
+rectangle centered at location $x,y$ and rotated by $\theta$ degrees
+clockwise from vertical.
+
\end{document}