http://people.csail.mit.edu/jaffer/Marbling/Commands
PDF
PST-marble-v1.4 Commands
Colors
RGB colors can be specified in three formats:
- [0.906 0.8 0.608]
- Red, green, and blue color components between 0 and 1 in square
brackets.
- [231 204 155]
- Red, green, and blue color components between 0 and 255 in
square brackets.
- (e7cc9b)
- Red, green, and blue
(RrGgBb)
hexadecimal color components between 00 and fF in
parentheses.
In the command arguments [rgb ...] indicates a
bracketed sequence of colors. For example:
[(c28847) [231 204 155] [0.635 0.008 0.094]]
Parameters
\psMarble [
parameter-assignment, ..., parameter-assignment
](width,height)
\psMarble [
parameter-assignment, ..., parameter-assignment
](x−,y−)(x+,y+)
The comma separated parameter assignments are part of
the \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 background=, colors=, seed=, actions=,
and spractions= must be enclosed in curly
braces {}.
- background= {[0 0 0]}
-
Specifies the color for regions where paint has not been dropped
(or moved to).
- bckg= true
- When bckg=false the background color is not shown.
- 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 colors.
- drawcontours= false
- When drawcontours=true paint contours are drawn with lines; when
drawcontours=false contours are filled;
- oversample= 0
- When 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 oversample=1 employs raster-rendering
to more quickly compute each image pixel
individually. When 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 oversample=0. With GhostScript oversample=2
rendering takes four times as long, but produces an image no
better than oversample=1. When oversample is
between 0 and 1, the rendering is on a coarser grid
than oversample=1, speeding image production.
- overscan= 1
- 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.
- seed= {Mathematical Marbling}
- Specifies the random seed used for Gaussian-drops
and uniform-drops commands. Changing the seed
value changes the positions of all drops from
the Gaussian-drops and uniform-drops
commands.
- viscosity= 1000
- Specifies the overall kinetic viscosity of the virtual tank
fluid. Its units are mm2/s; the default value
of 1000, which is 1000 times more viscous than water, is a typical
value for marbling. Increasing viscosity reduces the
fluid movement far from the tines.
- 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 colors
sequence. The available commands are listed below.
- spractions= {}
- Specifies the sequence of spray commands to perform. Spray
commands are performed after marbling.
Dropping Paint
- x y Rd rgb drop
- Places a drop of color rgb and radius Rd
centered at location x,y.
- x y Ri [rgb ...] n concentric-rings
- Places n rings in color sequence
[rgb ...]
centered at location x,y, each ring having
thickness Ri.
- x y θ [R ...] [rgb ...] Rd line-drops
- Places drops of colors [rgb ...] (in
sequence) of radius Rd in a line
through x,y at θ degrees clockwise from
vertical at distances [R ...]
from x,y.
- x y R θ S δ [rgb ...] n Rd coil-drops
- Places n drops of colors [rgb ...]
(in sequence) of radius Rd in an arc or spiral centered
at x,y starting at radius R and θ
degrees clockwise from vertical, moving S
along the arc and incrementing the arc radius by δ
after each drop.
- x y R θ ε [rgb ...] n Rd Gaussian-drops
- Places n drops of colors [rgb ...] of
radius Rd randomly in a circular or elliptical
disk centered at x,y having mean
radius R, θ degrees clockwise from vertical,
and length-to-width ratio ε. 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.
- x y Lx Ly θ [rgb ...] n Rd uniform-drops
- Places n drops of colors [rgb ...] of
radius Rd randomly in a Lx
by Ly rectangle centered at location x,y
and rotated by θ degrees clockwise from
vertical.
Deformations
- θ [R ...] V S D rake
- Pulls tines of diameter D at θ degrees
clockwise from the positive y-axis through the virtual tank at
velocity V, moving fluid on the tine path a
distance S. The tine paths are spaced
[R ...] from the tank center at their nearest
points.
- xb yb xe ye V D stylus
- Pulls a single tine of diameter D from
xb,yb
to xe,ye at velocity V.
Legacy name stroke also works.
- x y [R ...] ω θ D stir
- Pulls tines of diameter D in circular tracks of radii
[R ...] (negative R is counterclockwise)
around location x,y at angular velocity ω. The
maximum angle through which fluid is moved is θ
degrees.
- x y Γ t vortex
- Rotates fluid clockwise around location x,y as would
result from an impulse of circulation Γ after
time t. At small t the rotational shear is
concentrated close to the center. As time passes the shear
propagates outward.
- θ λ Ω S wiggle
- Applies sinsusoidal wiggle with period λ and maximum
displacement S to whole tank. With θ=0, a
point at x,y is moved
to x+S⋅sin(360⋅y/λ+Ω),y.
- θ R shift
- Shifts tank by R at θ degrees clockwise from vertical.
- [n S Ω tines]
- 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 Ω
when n is odd and S/2−Ω
when n is even.
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 Rd.
- x y R θ ε [rgb ...] n Rd Gaussian-spray
- Places n drops of colors [rgb ...] randomly
in a circular or elliptical disk centered at x,y having
mean radius R, θ degrees clockwise from
vertical, and length-to-width ratio ε. 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.
- x y Lx Ly θ [rgb ...] n Rd uniform-spray
- Places n drops of colors [rgb ...] randomly
in a Lx by Ly rectangle
centered at location x,y and rotated by θ
degrees clockwise from vertical.
Copyright © 2019 Aubrey Jaffer
I am a guest and not a member of the MIT Computer Science and Artificial Intelligence Laboratory.
My actions and comments do not reflect in any way on MIT.
|
Topological Computer Graphics
|
agj @ alum.mit.edu |
| Go Figure!
|