texlive[50146] Master/texmf-dist: pst-marble (27feb19)
commits+karl at tug.org
commits+karl at tug.org
Wed Feb 27 22:55:03 CET 2019
Revision: 50146
http://tug.org/svn/texlive?view=revision&revision=50146
Author: karl
Date: 2019-02-27 22:55:03 +0100 (Wed, 27 Feb 2019)
Log Message:
-----------
pst-marble (27feb19)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md
trunk/Master/texmf-dist/doc/generic/pst-marble/README.md
trunk/Master/texmf-dist/doc/generic/pst-marble/examples/Latte.pdf
trunk/Master/texmf-dist/doc/generic/pst-marble/examples/Latte.tex
trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.pdf
trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf
trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex
trunk/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
trunk/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
trunk/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md 2019-02-27 21:55:03 UTC (rev 50146)
@@ -1,6 +1,6 @@
# **CHANGES** #
-# pst-marble v. 1.3a #
-# 2019/02/23 #
+# pst-marble v. 1.4 #
+# 2019/02/25 #
Source: pst-marble.tex, pst-marble.sty, pst-marble.pro
Author: Aubrey Jaffer
@@ -334,3 +334,43 @@
## Changes in v. 1.3a:
## Bug fixes
+
+---
+
+## Changes in v. 1.4:
+
+## The command **\\psMarble**
+
+is now available in two forms:
+
+**\psMarble\[parameter-assignment,...,parameter-assignment\](width,height)**
+
+**\psMarble\[parameter-assignment,...,parameter-assignment\](x−,y−)(x+,y+)**
+
+## New option **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.
+
+## New option **spractions** with new post-marble actions
+
+Specifies the sequence of spray commands to perform.
+Spray commands are performed after marbling.
+
+## **Gaussian-spray**
+
+**xc yc r ang eccentricity \[ rgb \] n Rd Gaussian-spray**
+
+Places **n** drops of colors **\[rgb\]** randomly in a circular
+or elliptical disk centered at **xc, yc** having mean radius **Rd**,
+**ang** degrees clockwise from vertical, and length-to-width ratio
+**eccentricity**.
+
+## **uniform-spray**
+
+**xc yc xsid ysid angle \[ rgb \] n Rd uniform-spray**
+
+Places **n** drops of colors **\[rgb\]** randomly in a **xsid** by **ysid**
+rectangle centered at location **xc, yc** and rotated by **ang** degrees
+clockwise from vertical.
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-marble/README.md 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/doc/generic/pst-marble/README.md 2019-02-27 21:55:03 UTC (rev 50146)
@@ -1,6 +1,6 @@
# **README** #
-# pst-marble v. 1.3a #
-# 2019/02/23 #
+# pst-marble v. 1.4 #
+# 2019/02/25 #
Source: pst-marble.tex, pst-marble.sty, pst-marble.pro
Author: Aubrey Jaffer
@@ -36,6 +36,11 @@
- wiggle
- shift
+Also some *spray-actions* (post-marble actions) like:
+
+- Gaussian-spray
+- uniform-spray
+
With these commands one can create quite artistic marble-like patterns following
the rules of fluid mechanics.
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/examples/Latte.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/examples/Latte.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-marble/examples/Latte.tex 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/doc/generic/pst-marble/examples/Latte.tex 2019-02-27 21:55:03 UTC (rev 50146)
@@ -21,11 +21,16 @@
0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
0 0 -50e3 100 vortex
%% tulip
- 0 -250 55 colors 0 get drop
- 0 -200 35 colors 2 get drop
- 0 -150 55 colors 0 get drop
- 0 -100 35 colors 2 get drop
- 0 -50 55 colors 0 get drop
+ 0 -250 30 colors 1 get drop
+ 0 -250 50 colors 0 get drop
+ 0 -200 20 colors 1 get drop
+ 0 -200 30 colors 2 get drop
+ 0 -150 30 colors 1 get drop
+ 0 -150 50 colors 0 get drop
+ 0 -100 20 colors 1 get drop
+ 0 -100 30 colors 2 get drop
+ 0 -50 30 colors 1 get drop
+ 0 -50 50 colors 0 get drop
0 75 0 -450 20 30 stylus
%% wreath
0 10 390 90 95 0 colors 1 get 14 25 coil-drops
@@ -35,6 +40,9 @@
-100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops
-100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops
-300 200 300 350 20 30 stylus
+ },
+ spractions={
+ 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray
}
](12,12)
\end{pspicture}
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-commands.tex 2019-02-27 21:55:03 UTC (rev 50146)
@@ -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,25 +48,25 @@
\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})
@@ -64,32 +73,140 @@
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:
-\myMarble{\texttt{[(c28847) [231 204 155] [0.635 0.008 0.094]]}}{}
+\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.
+
+\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$
and $\theta$ degrees clockwise from vertical,
@@ -96,7 +213,7 @@
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 @@
$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,7 +230,7 @@
\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
@@ -120,12 +237,12 @@
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
@@ -132,7 +249,7 @@
$\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
@@ -139,19 +256,41 @@
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}
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex 2019-02-27 21:55:03 UTC (rev 50146)
@@ -55,7 +55,7 @@
\begin{document}
-\title{pst-marble v 1.3a}
+\title{pst-marble v 1.4}
\subtitle{A PSTricks package to draw marble-like patterns}
\author{
Aubrey \textsc{Jaffer}\\
@@ -79,7 +79,7 @@
\begin{abstract}
-Marbling originated in Asia as a decorative art more than 800 years ago and spread to Europe in the 1500s where it was used for end-papers and book covers.
+Marbling originated in Asia as a decorative art more than 800 years ago and spread to Europe in the 1500s where it was used for end-papers and book covers.
The mathematical fascination with paint marbling is that while rakings across the tank stretch and deform the paint boundaries, they do not break or change the topology of the surface. With mechanical guides, a raking can be undone by reversing the motion of the rake to its original position. Raking is thus a physical manifestation of a homeomorphism, a continuous function between topological spaces (in this case between a topological space and itself) that has a continuous inverse function.
\begin{center}
@@ -429,28 +429,37 @@
\section{The command \Lcs{psMarble}}
\begin{BDef}
-\Lcs{psMarble}\OptArgs\Largr{x , y}
+\Lcs{psMarble}\OptArgs\Largr{width,height}
\end{BDef}
+\begin{BDef}
+\Lcs{psMarble}\OptArgs\Largr{x-,y-}\Largr{x+,y+}
+\end{BDef}
+If none of the optional arguments \Largr{width,height} or \Largr{x-,y-}\Largr{x+,y+} are taken, the default value \Largr{10,10} respectively \Largr{-5,-5}\Largr{5,5} is used. If the \verb!\begin{pspicture}! arguments do not match the optional arguments \Largr{width,height} or \Largr{x-,y-}\Largr{x+,y+} the image will be cropped or padded.
-The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{background=}, \nxLkeyword{seed=}, \nxLkeyword{oversample=}, \\ \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}.
+The 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 optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimension of the image---the default is \Largr{10,10}.
-
-If the \verb!\begin{pspicture}! arguments do not match the optional argument \Largr{x , y}, then the image will be cropped or padded.
-
\medskip
-\begin{quote}
+\begin{quote}\small
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }
\toprule
\textbf{Name} & \textbf{Default} & \textbf{Meaning} \\
\midrule
\Lkeyword{actions} & 0 0 35 colors 35 concentric-rings & The type of marbling action\\
-\Lkeyword{background} & [0 0 0] & Background color to be used with rgb or RGB or hexadecimal notation\\
+%
+\Lkeyword{spractions} & \{\} & Specifies the sequence of spray commands to perform. Spray commands are performed after marbling.\\
+%
+\Lkeyword{background} & [1 1 1] & Background color to be used with rgb or RGB or hexadecimal notation\\
+%
\Lkeyword{seed} & Mathematical Marbling & Random seed to obtain the same arrangement of random drops within \texttt{Gaussian-drops} and \texttt{uniform-drops}\\
-\Lkeyword{oversample} & 0 & This is a rendering option: \texttt{oversample=0} makes the image pixel free; \texttt{oversample>0}: the smaller the positive value, the larger the pixels.\\
+%
+\Lkeyword{oversample} & 0 & This is a rendering option: \texttt{oversample=0} makes the image pixel free; \texttt{oversample>0}: the smaller the positive value, the larger the pixels.\\
+%
+\Lkeyword{overscan} & 1 & When the \texttt{overscan} value is greater than \texttt{1}, proportionally more image (outside of the specified area) is shown, and the specified area is outlined with a dashed rectangular border.\\
+%
\Lkeyword{bckg} & true & Boolean: to turn on/off the background color\\
-\Lkeyword{colors} & \parbox{5cm}{
+%
+\Lkeyword{colors} & \parbox[t]{4cm}{
[0.275 0.569 0.796]
[0.965 0.882 0.302]
[0.176 0.353 0.129]
@@ -461,15 +470,19 @@
[0.816 0.333 0.475]
[0.365 0.153 0.435]
[0.624 0.588 0.439]
-} & Colors of the marbling can be set within the rgb-color system or as hexadecimal color constants. Shown are rgb constants between 0 and 1.\\
+} & Colors of the marbling can be set within the rgb-color system or as hexadecimal color constants. Shown are rgb constants between \texttt{0} and \texttt{1}.\\
+%
\Lkeyword{drawcontours} & false & Boolean: if set to \texttt{true}, it only draws the contours\\
+%
\Lkeyword{viscosity} & 1000 & Global primitive: viscosity of the system\\
\bottomrule
\end{tabularx}
\end{quote}
-\medskip
+\newpage
+
+
\textbf{Notes:}
\begin{itemize}
@@ -540,6 +553,37 @@
\newpage
+\subsection{\texttt{overscan}}
+
+When the overscan value is greater than 1, proportionally more image (outside of the specified area) is shown, and the specified
+area is outlined with a dashed rectangular border. This is a utility for developing marblings, new for version 1.4.
+
+\begin{minipage}[t]{6cm}\kern0pt
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[overscan=2](6,6)
+\end{pspicture}
+{\small\begin{verbatim}
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[overscan=2](6,6)
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+\hfill
+\begin{minipage}[t]{6cm}\kern0pt
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[overscan=1.5](6,6)
+\end{pspicture}
+{\small\begin{verbatim}
+\begin{pspicture}(-3,-3)(3,3)
+\psMarble[overscan=1.5](6,6)
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+
+
+\newpage
+
+
\section{Colors}
All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword{colors=} which are initially setup within the \texttt{pst-marble.pro}, we can change them within the concentric circles basic figure \texttt{concentric-rings} as follows:
@@ -694,7 +738,7 @@
actions={
0 250 90 [ 6 80 0 tines ] colors 4 get 20 line-drops
0 -250 90 [ 6 80 50 tines ] [[0.2 0.5 1][1 0 1]] 20 line-drops
-}]
+}](10,10)
\rput(0,2.5){
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
@@ -721,7 +765,7 @@
actions={
0 250 90 [ 6 80 0 tines ] colors 4 get 20 line-drops
0 -250 90 [ 6 80 50 tines ] [[0.2 0.5 1][1 0 1]] 20 line-drops
-}]
+}](10,10)
\rput(0,2.5){
\psdot[linecolor=red](0,0)
\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
@@ -881,7 +925,7 @@
actions={
0 0 400 30 95 0 [ 231 204 155 ] 20 25 coil-drops
0 0 300 180 35 -4 [[ 128 65 11 ][ 65 128 11 ]] 50 20 coil-drops
-}]
+}](10,10)
\end{pspicture*}
\end{center}
{\tiny\begin{verbatim}
@@ -891,7 +935,7 @@
actions={
0 0 400 30 95 0 [ 231 204 155 ] 20 25 coil-drops
0 0 300 180 35 -4 [[ 128 65 11 ][ 65 128 11 ]] 50 20 coil-drops
-}]
+}](10,10)
\end{pspicture*}
\end{verbatim}}
@@ -923,7 +967,7 @@
actions={
200 0 100 0 1 colors 150 10 Gaussian-drops
-300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops
-}]
+}](10,10)
\pscircle[linecolor=red](2,0){!1}\pscircle[linecolor=red](2,0){!1 2 sqrt mul}
\pscircle[linecolor=red](2,0){!1 2 mul}
\rput{60}(-3,0){
@@ -948,7 +992,7 @@
actions={
200 0 100 0 1 colors 150 10 Gaussian-drops
-300 0 100 30 4 [190 195 9] 55 10 Gaussian-drops
-}]
+}](10,10)
\pscircle[linecolor=red](2,0){!1}\pscircle[linecolor=red](2,0){!1 2 sqrt mul}
\pscircle[linecolor=red](2,0){!1 2 mul}
\rput{60}(-3,0){
@@ -987,7 +1031,7 @@
-300 -200 150 200 0 colors 4 get 25 12 uniform-drops
100 300 400 50 0 colors 3 get 30 8 uniform-drops
-200 300 50 400 45 colors 5 get 30 8 uniform-drops
-}]
+}](10,10)
\rput(0,0){\psframe(-1,-1)(1,1)}
\psline[linecolor=red]{|<->|}(-1,-1.2)(1,-1.2)\uput[-90](0,-1.2){\textcolor{red}{200}}
\psline[linecolor=red]{|<->|}(1.2,-1)(1.2,1)\uput[0](1.2,0){\textcolor{red}{200}}
@@ -1014,7 +1058,7 @@
-300 -200 150 200 0 colors 4 get 25 12 uniform-drops
100 300 400 50 0 colors 3 get 30 8 uniform-drops
-200 300 50 400 45 colors 5 get 30 8 uniform-drops
-}]
+}](10,10)
\rput(0,0){\psframe(-1,-1)(1,1)}
\psline[linecolor=red]{|<->|}(-1,-1.2)(1,-1.2)\uput[-90](0,-1.2){\textcolor{red}{200}}
\psline[linecolor=red]{|<->|}(1.2,-1)(1.2,1)\uput[0](1.2,0){\textcolor{red}{200}}
@@ -1226,7 +1270,7 @@
} for
% angle r V tU D
45 [ 200 ] 20 -100 50 rake
-}]%
+}](10,10)
\psMarble[viscosity=1000,
bckg=false,
linewidth=0.1,
@@ -1236,7 +1280,7 @@
/rad exch sqrt 50 mul def
0 0 rad [1 0.5 0] drop
} for
-}]%
+}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=yellow](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){3}{90}{45}
@@ -1294,7 +1338,7 @@
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
45 [200] 20 -100 50 rake
-}](10,10)%
+}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
@@ -1314,7 +1358,7 @@
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
45 [200] 20 -100 50 rake
-}](10,10)%
+}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
@@ -1352,7 +1396,7 @@
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
45 [200] 20 100 50 rake
-}](10,10)%
+}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
@@ -1372,7 +1416,7 @@
0 0 50 2 sqrt mul colors 9 concentric-rings
% angle r V tU D
45 [200] 20 100 50 rake
-}](10,10)%
+}](10,10)
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
\psarcn[linewidth=0.1]{->}(0,0){2}{90}{45}
@@ -1610,7 +1654,7 @@
350 20 cos mul 350 20 sin mul 15 [0.49 0.75 0.79] drop
350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop
350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop
- }]
+ }](10,10)
\psMarble[viscosity=20,bckg=false,
actions={
350 0 15 [0.22 0.27 0.4] drop
@@ -1618,7 +1662,7 @@
350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop
350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop
0 0 [ 350 ] 10 -70 10 stir
- }]
+ }](10,10)
\psarc[arrowinset=0]{->}(0,0){3.9}{0}{70}
\psline[linecolor=blue](0;0)(3.5;0)
\psline[linecolor=blue](0;0)(3.5;70)
@@ -2169,7 +2213,7 @@
},
actions={
0 0 43 colors 32 concentric-rings
-30 300 shift}]
+30 300 shift}](10,10)
\pstVerb{
/scaleFactor 10 1000 div def
/xS1 30 sin 300 mul scaleFactor mul def
@@ -2196,7 +2240,7 @@
},
actions={
0 0 43 colors 32 concentric-rings
-30 300 shift}]
+30 300 shift}](10,10)
\pstVerb{
/scaleFactor 10 1000 div def
/xS1 30 sin 300 mul scaleFactor mul def
@@ -2215,6 +2259,81 @@
\newpage
+\section{Spray actions}
+
+Spray actions are intended for drops small enough that they don't noticeably move paint boundaries. The radii of spray droplets are the cube roots of log-normal distributed values with mean \texttt{Rd}.
+
+Spray commands are performed after marbling!
+
+
+\subsection{\texttt{Gaussian-spray}}
+
+\begin{verbatim}
+xc yc r ang eccentricity [ rgb ] n Rd Gaussian-spray
+\end{verbatim}
+Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a circular or elliptical disk centered at \texttt{xc, yc} having mean radius \texttt{Rd}, \texttt{ang} degrees clockwise from vertical, and length-to-width ratio \texttt{eccentricity}. For a circular disk, 63\,\% of drops are within radius $r$, 87\,\% of drops are within $r\sqrt{2}$, and 98\,\% of drops are within radius $2r$.
+
+\begin{center}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psMarble[
+ colors={[0.95 0.95 0.95]},
+ spractions={
+ 0 0 250 -45 1 [0.3 0 0.5] 1000 3 Gaussian-spray
+}](11,11)
+\pscircle[linecolor=red,linestyle=dashed](0,0){2.5}
+\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 mul}
+\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 sqrt mul}
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-5.5,-5.5)(5.5,5.5)
+\psMarble[
+ colors={[0.95 0.95 0.95]},
+ spractions={
+ 0 0 250 -45 1 [0.3 0 0.5] 1000 3 Gaussian-spray
+}](11,11)
+\pscircle[linecolor=red,linestyle=dashed](0,0){2.5}
+\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 mul}
+\pscircle[linecolor=red,linestyle=dashed](0,0){!2.5 2 sqrt mul}
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\subsection{\texttt{uniform-spray}}
+
+\begin{verbatim}
+xc yc xsid ysid angle [ rgb ] n Rd uniform-spray
+\end{verbatim}
+Places \texttt{n} drops of colors \texttt{[rgb]} randomly in a \texttt{xsid} by \texttt{ysid} rectangle centered at location \texttt{xc, yc} and rotated by \texttt{ang} degrees clockwise from vertical.
+
+\begin{center}
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[
+ colors={[0.95 0.95 0.95]},
+ spractions={
+ 0 0 600 600 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 650 4 uniform-spray
+}](10,10)
+\psframe[linecolor=red,linestyle=dashed](-3,-3)(3,3)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[
+ colors={[0.95 0.95 0.95]},
+ spractions={
+ 0 0 600 600 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 650 4 uniform-spray
+}](10,10)
+\psframe[linecolor=red,linestyle=dashed](-3,-3)(3,3)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
\section{Combined actions -- Gallery}
Note that \texttt{pst-marble} ships with an ``examples'' folder. Therein some example files contain some advanced PostScript techniques (for the interested PostScript user).
@@ -2632,8 +2751,7 @@
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [105 160 99] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
-}
-]
+}](10,10)
\psMarble[
colors={
[0 0 0]
@@ -2657,8 +2775,7 @@
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [0 0 0] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
-}
-]
+}](10,10)
\end{pspicture}
\end{minipage}
\begin{minipage}[t]{8cm}
@@ -2690,8 +2807,7 @@
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [105 160 99] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
-}
-]
+}](10,10)
\psMarble[
colors={
[0 0 0]
@@ -2715,8 +2831,7 @@
0 -500 850 -30 220 0 colors 4 get 5 50 coil-drops
0 0 150 0 70 10 [0 0 0] 35 20 coil-drops
250 0 [ 120 80 ] 20 100 20 stir
-}
-]
+}](10,10)
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -2733,11 +2848,7 @@
background={
[0.1 0 0.1]
},
- colors={
- (e7cc9b)
- (c28847)
- (80410b)
- },
+ colors={(e7cc9b)(c28847)(80410b)},
viscosity=1000,
actions={
%% coffee mug rim and stirred foam
@@ -2748,11 +2859,16 @@
0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
0 0 -50e3 100 vortex
%% tulip
- 0 -250 55 colors 0 get drop
- 0 -200 35 colors 2 get drop
- 0 -150 55 colors 0 get drop
- 0 -100 35 colors 2 get drop
- 0 -50 55 colors 0 get drop
+ 0 -250 30 colors 1 get drop
+ 0 -250 50 colors 0 get drop
+ 0 -200 20 colors 1 get drop
+ 0 -200 30 colors 2 get drop
+ 0 -150 30 colors 1 get drop
+ 0 -150 50 colors 0 get drop
+ 0 -100 20 colors 1 get drop
+ 0 -100 30 colors 2 get drop
+ 0 -50 30 colors 1 get drop
+ 0 -50 50 colors 0 get drop
0 75 0 -450 20 30 stylus
%% wreath
0 10 390 90 95 0 colors 1 get 14 25 coil-drops
@@ -2762,6 +2878,9 @@
-100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops
-100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops
-300 200 300 350 20 30 stylus
+ },
+ spractions={
+ 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray
}
](12,12)
\end{pspicture}
@@ -2772,11 +2891,7 @@
background={
[0.1 0 0.1]
},
- colors={
- (e7cc9b)
- (c28847)
- (80410b)
- },
+ colors={(e7cc9b)(c28847)(80410b)},
viscosity=1000,
actions={
%% coffee mug rim and stirred foam
@@ -2787,11 +2902,16 @@
0 0 283 0 1 colors 1 get 30 30 Gaussian-drops
0 0 -50e3 100 vortex
%% tulip
- 0 -250 55 colors 0 get drop
- 0 -200 35 colors 2 get drop
- 0 -150 55 colors 0 get drop
- 0 -100 35 colors 2 get drop
- 0 -50 55 colors 0 get drop
+ 0 -250 30 colors 1 get drop
+ 0 -250 50 colors 0 get drop
+ 0 -200 20 colors 1 get drop
+ 0 -200 30 colors 2 get drop
+ 0 -150 30 colors 1 get drop
+ 0 -150 50 colors 0 get drop
+ 0 -100 20 colors 1 get drop
+ 0 -100 30 colors 2 get drop
+ 0 -50 30 colors 1 get drop
+ 0 -50 50 colors 0 get drop
0 75 0 -450 20 30 stylus
%% wreath
0 10 390 90 95 0 colors 1 get 14 25 coil-drops
@@ -2801,6 +2921,9 @@
-100 250 75 [ 6 80 0 tines ] colors 1 get 20 line-drops
-100 250 75 [ 6 80 0 tines ] colors 0 get 30 line-drops
-300 200 300 350 20 30 stylus
+ },
+ spractions={
+ 0 0 300 -45 1 [0.1 0.1 0.1] 1000 3 Gaussian-spray
}
](12,12)
\end{pspicture}
Modified: trunk/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-marble/pst-marble.pro 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/dvips/pst-marble/pst-marble.pro 2019-02-27 21:55:03 UTC (rev 50146)
@@ -1,9 +1,11 @@
-%%Creator: Aubrey Jaffer
-%%For: Voluntocracy
%%Copyright: 2018, 2019 Aubrey Jaffer
-%%Creator: Aubrey Jaffer
-%%For: Voluntocracy
-%%CreationDate: 2019-02-10
+%%CreationDate: 2019-02-20
+
+% This program can redistributed and/or modified under the terms of
+% the LaTeX Project Public License Distributed from CTAN archives in
+% directory macros/latex/base/lppl.txt; either version 1.3c of the
+% License, or (at your option) any later version.
+
/plotdict 100 dict def
plotdict begin
@@ -51,10 +53,9 @@
% clippath pathbbox /hiy exch round cvi def /hix exch round cvi def
% /loy exch round cvi def /lox exch round cvi def
% oversample 0 gt not {background aload pop setrgbcolor fill} if
- /scl hiy loy sub hix lox sub max def
-% /orgx hix lox add 2 div def
-% /orgy hiy loy add 2 div def
+ /scl hiy loy sub hix lox sub max overscan div def
/acnt actions length def
+ /pcnt spractions length def
% set background field of each /drop
0 1 acnt -1 add
{
@@ -97,10 +98,43 @@
do-raster
}
{
-% orgx orgy translate
- scl 1.0 div dup scale
+ gsave
+ scl dup scale
do-drops
+ grestore
} ifelse
+ % post-actions
+ pcnt 0 gt
+ {
+ gsave
+ scl 1000 div dup scale
+ 0 1 pcnt -1 add
+ {
+ /idx exch def
+ spractions idx get aload pop /ct exch def
+ ct /Gaussian-spray eq
+ {Gaussian-spray-do}
+ {
+ ct /uniform-spray eq
+ {uniform-spray-do}
+ {(unrecognized post token) = ct =} ifelse
+ } ifelse
+ } for
+ grestore
+ } if
+ overscan 1 gt
+ {
+ gsave
+ 1 setlinewidth
+ 1 overscan div dup scale
+ 0 setgray
+ [ 10 10 ] 0 setdash
+ lox loy hix lox sub hiy loy sub rectstroke
+ 1 setgray
+ [ 10 10 ] 10 setdash
+ lox loy hix lox sub hiy loy sub rectstroke
+ grestore
+ } if
} bind def
/ct-dispatch
@@ -140,7 +174,7 @@
actions cdx get aload pop /ct exch def
ct /drop eq
% movement due to drop.
- { % px py cx cy rad^2 rgb
+ { % px py cx cy rad^2 bgc rgb
/rgb exch def
pop % /bgc exch def
/rad^2 exch def
@@ -147,9 +181,9 @@
/cy exch def /cx exch def
/py exch def /px exch def
/a^2 px cx sub dup mul py cy sub dup mul add def
- a^2 1e-10 lt {0.} {1. rad^2 a^2 div sub} ifelse
+ a^2 1e-10 lt {0} {1 rad^2 a^2 div sub} ifelse
/disc exch def
- disc 0. le
+ disc 0 le
{rgb exit}
{
/a disc sqrt def
@@ -302,8 +336,13 @@
/rad^2 exch def /cy exch def /cx exch def
/py exch def /px exch def
/p-c^2 px cx sub dup mul py cy sub dup mul add def
- /a rad^2 p-c^2 div 1 add sqrt def
- py cy sub px cx sub a mul cx add exch a mul cy add
+ % p-c^2 rad^2 4096 mul gt
+ % { px py }
+ % {
+ /a rad^2 p-c^2 div 1 add sqrt def
+ py cy sub px cx sub a mul cx add exch a mul cy add
+ % }
+ % ifelse
} bind def
%% Given x, y coordinates on stack, calculates movement due to
@@ -397,7 +436,7 @@
actions cdx get aload pop /ct exch def
ct /drop eq
% movement due to drop.
- { % px py cx cy rad^2 rgb
+ { % px py cx cy rad^2 bgc rgb
/rgb exch def
/bgc exch def
/rad^2 exch def
@@ -404,9 +443,8 @@
/cy exch def /cx exch def
/py exch def /px exch def
/a^2 px cx sub dup mul py cy sub dup mul add def
- a^2 1e-10 lt {0.} {1. rad^2 a^2 div sub} ifelse
- /disc exch def
- disc 0. le
+ /disc a^2 1e-10 lt {0} {1 rad^2 a^2 div sub} ifelse def
+ disc 0 le
{
disc -0.001 le
{rgb}
@@ -434,11 +472,11 @@
loy sampleover hiy
{
/iy exch def
- /fy iy orgy sub scl div 1.0 mul def
+ /fy iy scl div def
lox sampleover hix
{
/ix exch def
- /fx ix orgx sub scl div 1.0 mul def
+ /fx ix scl div def
fx fy actions2rgb
% color modifications
% fy dup mul fx dup mul add sqrt dup
@@ -448,7 +486,8 @@
% ifelse
% end color modifications
aload pop setrgbcolor
- newpath ix iy moveto sampleover 0 rlineto 0 sampleover rlineto sampleover neg 0 rlineto closepath FILL
+ newpath ix iy moveto sampleover 0 rlineto
+ 0 sampleover rlineto sampleover neg 0 rlineto closepath FILL
} for
} for
} bind def
@@ -680,7 +719,7 @@
end
} bind def
-% Returns number between 0. and 1.
+% Returns number between 0 and 1
/random:uniform
{
/str 7 string def
@@ -717,6 +756,34 @@
} repeat
} bind def
+/Gaussian-spray % xc yc r angle eccentricity [ rgb ] cnt drad
+{
+ /Gaussian-spray 9 array astore
+} bind def
+
+/Gaussian-spray-do % xc yc r angle eccentricity [ rgb ] cnt drad
+{
+ /drad exch def
+ /cnt exch def
+ /clra exch color-norm* def
+ /eccentricity exch sqrt def
+ /angle exch neg def
+ /r exch 2 sqrt div def
+ /yc exch def
+ /xc exch def
+ /nclr clra length def
+ /cdx 0 def
+ cnt
+ {
+ random:normal2 eccentricity div r mul exch eccentricity mul r mul
+ [ angle cos-sin 2 copy neg exch xc yc ] transform
+ newpath
+ clra cdx nclr mod get aload pop setrgbcolor
+ e random:normal2 pop drad log 3 mul add 3 div exp 0 360 arc fill
+ /cdx cdx 1 add def
+ } repeat
+} bind def
+
/uniform-drops % xc yc xsid ysid angle [ rgb ] cnt drad
{
/drad exch def
@@ -739,6 +806,35 @@
} repeat
} bind def
+/uniform-spray % xc yc xsid ysid angle [ rgb ] cnt drad
+{
+ /uniform-spray 9 array astore
+} bind def
+
+/uniform-spray-do % xc yc xsid ysid angle [ rgb ] cnt drad
+{
+ /drad exch def
+ /cnt exch def
+ /clra exch color-norm* def
+ /angle exch neg def
+ /ysid exch def
+ /xsid exch def
+ /yc exch def
+ /xc exch def
+ /nclr clra length def
+ /cdx 0 def
+ cnt
+ {
+ random:uniform 0.5 sub xsid mul
+ random:uniform 0.5 sub ysid mul
+ [ angle cos-sin 2 copy neg exch xc yc ] transform
+ newpath
+ clra cdx nclr mod get aload pop setrgbcolor
+ e random:normal2 pop drad log 3 mul add 3 div exp 0 360 arc fill
+ /cdx cdx 1 add def
+ } repeat
+} bind def
+
/serpentine-drops % xc yc [ xrs ] [ yrs ] th [ rgb ] drad
{
/drad exch def
Modified: trunk/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex 2019-02-27 21:55:03 UTC (rev 50146)
@@ -6,7 +6,7 @@
%% %%
%% Package `pst-marble' %%
%% %%
-%% Aubrey Jaffer, with help of Manuel Luque, Jürgen Gilg %%
+%% Aubrey Jaffer, with help of Manuel Luque, J\xFCrgen Gilg %%
%% Email address: agj at alum.mit.edu %%
%% Copyright (C) 2018-2019 Aubrey Jaffer %%
%% %%
@@ -25,8 +25,8 @@
\let \PSTMARBLELoaded\endinput
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey.tex\fi
-\def\fileversion{1.3a}
-\def\filedate{2019/02/23}
+\def\fileversion{1.4}
+\def\filedate{2019/02/25}
\message{`PST' v\fileversion, \filedate}
%
\pstheader{pst-marble.pro}
@@ -36,8 +36,10 @@
\define at key[psset]{pst-marble}{background}{\def\pst at marble@background{#1 }}
\define at key[psset]{pst-marble}{viscosity}{\def\pst at marble@visc{#1 }}
\define at key[psset]{pst-marble}{oversample}{\def\pst at marble@oversample{#1 }}
+\define at key[psset]{pst-marble}{overscan}{\def\pst at marble@overscan{#1 }}
\define at key[psset]{pst-marble}{seed}{\def\pst at marble@seed{#1}}
\define at key[psset]{pst-marble}{actions}{\def\pst at marble@actions{#1 }}
+\define at key[psset]{pst-marble}{spractions}{\def\pst at marble@spractions{#1 }}
% colors are red, green, and blue components between 0 and 1.
\define at key[psset]{pst-marble}{colors}{\def\pst at marble@colors{#1 }}
\define at boolkey[psset]{pst-marble}[Pst@]{drawcontours}[true]{}
@@ -48,58 +50,58 @@
[1 1 1]
},
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]
+ [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=0,
- actions={0 0 35 colors 35 concentric-rings},
+ overscan=1,
+ actions={0 0 36 colors 35 concentric-rings},
+ spractions={},
drawcontours=false,
bckg=true
- }%
+ }
\psset[pstricks]{shapealpha=1}
\def\psMarble{\def\pst at par{}\pst at object{psMarble}}
-\def\psMarble at i{\@ifnextchar({\psMarble at ii}{\psMarble at ii(10,10)}}
-\def\psMarble at ii(#1,#2){%
+\def\psMarble at i{\@ifnextchar({\psMarble at ii}{\psMarble at iii(-5,-5)(5,5)}}
+\def\psMarble at ii(#1,#2){\@ifnextchar({\psMarble at iii(#1,#2)}{\psMarble at iii(#1 -0.5 mul, #2 -0.5 mul)(#1 0.5 mul,#2 0.5 mul)}}
+\def\psMarble at iii(#1,#2)(#3,#4){
\begin at SpecialObj
-\addto at pscode{%
+\addto at pscode{
plotdict begin
/FILL {\tx at setTransparency \tx at setBlendmode fill } def
-%/FILL {\tx at setTransparency fill } def
/STROKE {\pst at number\pslinewidth 1000 div SLW \tx at setStrokeTransparency \tx at setBlendmode systemdict /stroke get exec} def
/cm {\pst at number\psunit mul } bind def
/background \pst at marble@background color-norm def
/colors [\pst at marble@colors] def
/seed (\pst at marble@seed) rc4setkey def
-/pagewidth #1 cm def % en cm
-/pageheight #2 cm def % en cm
-/loy pageheight -2 div cvi def
-/hiy pageheight 2 div cvi def
-/hix pagewidth 2 div cvi def
-/lox pagewidth -2 div cvi def
-/orgx hix lox add 2 div def
-/orgy hiy loy add 2 div def
-% orgx orgy translate
+/lox #1 cm cvi def
+/loy #2 cm cvi def
+/hix #3 cm cvi def
+/hiy #4 cm cvi def
/visc \pst at marble@visc abs def
/oversample \pst at marble@oversample dup 0 eq \pst at marble@visc 0 lt and {pop 1} if def
+/overscan \pst at marble@overscan def
/actions [\pst at marble@actions] def
/acnt actions length def
+/spractions [\pst at marble@spractions] def
+/pcnt spractions length def
\ifPst at drawcontours /Contours {STROKE} def \else /Contours {FILL} def \fi
gsave
\ifPst at bckg
background aload pop setrgbcolor
- lox loy pagewidth pageheight rectfill
-% newpath lox loy moveto pagewidth 0 rlineto 0 pageheight rlineto pagewidth neg 0 rlineto closepath FILL
+ lox loy hix lox sub hiy loy sub rectfill
+% newpath lox loy moveto lox hiy lineto hix hiy lineto hix loy lineto closepath FILL
\fi
- lox loy pagewidth pageheight rectclip
+ lox loy hix lox sub hiy loy sub rectclip
marble
grestore
end}% fin du code ps
Modified: trunk/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty 2019-02-27 21:54:09 UTC (rev 50145)
+++ trunk/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty 2019-02-27 21:55:03 UTC (rev 50146)
@@ -1,5 +1,5 @@
\RequirePackage{pstricks}
-\ProvidesPackage{pst-marble}[2019/02/23 package wrapper for PSTricks pst-marble.tex]
+\ProvidesPackage{pst-marble}[2019/02/25 package wrapper for PSTricks pst-marble.tex]
\input pst-marble.tex
\ProvidesFile{pst-marble.tex}
[\filedate\space v\fileversion\space `PST-marble']
@@ -6,6 +6,6 @@
\IfFileExists{pst-marble.pro}{
\ProvidesFile{pst-marble.pro}
- [2019-02-23 v. 1.3a, PostScript prologue file]
+ [2019-02-25 v. 1.4, PostScript prologue file]
\@addtofilelist{pst-marble.pro}}{}
\endinput
More information about the tex-live-commits
mailing list