summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
blob: 429780a9a71983d26d765c3695915a99a07ffd9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
% pdflatex -interaction nonstopmode pst-marble-commands.tex
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{xcolor}
\usepackage{hyperref}

%\documentclass[%
%    11pt,
%    english,
%    BCOR10mm,
%    DIV12,
%    bibliography=totoc,
%    parskip=false,
%    fleqn,
%    smallheadings,
%    headexclude,
%    footexclude,
%    oneside,
%    dvipsnames,
%    svgnames,
%    x11names,
%]{pst-doc}

\pagestyle{empty}

\newcommand\myMarble[2]{%
  \smallskip
      \qquad {#1} \texttt{#2}
}

\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{]} }

%% \parskip5pt
\parindent0pt

\begin{document}

\section*{PST-marble Commands}

\url{http://people.csail.mit.edu/jaffer/Marbling/pst-marble-commands.pdf}

\subsection*{Colors}

RGB colors can be specified in three formats:

\myMarble{\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 ]}}{}

Red, green, and blue color components between 0 and 255 in square
brackets.

\myMarble{\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:

\myMarble{\texttt{[(c28847) [231 204 155] [0.635 0.008 0.094]]}}{}


\subsection*{Dropping Paint}

\myMarble{$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}

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}

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}

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 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}

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$,
$\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$.

\myMarble{$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$
degrees clockwise from vertical.

\subsection*{Deformations}

\myMarble{$\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}

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}

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}

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}

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}

Shifts tank by $R$ at $\theta$ degrees clockwise from vertical.

\myMarble{\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.
\end{document}