summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/CHANGES.md97
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/README.md4
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdfbin673946 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.tex59
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdfbin357739 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.tex29
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdfbin544475 -> 107566 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex5
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdfbin419957 -> 58245 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex1
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdfbin535630 -> 232554 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex15
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdfbin1277025 -> 168019 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdfbin470361 -> 85245 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex8
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdfbin18660849 -> 3283020 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex1718
-rw-r--r--Master/texmf-dist/dvips/pst-marble/pst-marble.pro457
-rw-r--r--Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex36
-rw-r--r--Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty4
20 files changed, 1420 insertions, 1013 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md b/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md
index 3d30ca28d80..2274dbd7bfc 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md
+++ b/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md
@@ -1,6 +1,6 @@
# **CHANGES** #
-# pst-marble v. 1.1 #
-# 2018/01/24 #
+# pst-marble v. 1.2 #
+# 2019/02/01 #
Source: pst-marble.tex, pst-marble.sty, pst-marble.pro
Author: Aubrey Jaffer
@@ -198,3 +198,96 @@ They are available for these following actions as well:
spiral-drops
and automatically detected.
+
+## Changes in v. 1.2:
+
+The actions **arc-drops** and **spiral-drops** are erased and bundled together
+under the action:
+
+## **coil-drops**
+
+**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: if 0 it starts North,
+ if 90 it starts East, ...
+ arcinc Arc-distance 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
+ cnt Number of the drops
+ drad Radius of the drops
+
+The actions **random-drops** and **random-drops-colors** are erased and substituted
+by *two new fully parameterized actions*:
+
+## **Gaussian-drops**
+
+Defines a randomly calculated series of drops within a circle/ellipse
+
+**xc yc r ang eccentricity \[ rgb \] cnt drad Gaussian-drops**
+
+Drops **cnt** paint drops with radius **drad** in normal (Gaussian) distribution
+centered at **xc, yc** with radius **r**, **ang** degrees from vertical and
+length to width ratio **eccentricity** (1 is circular).
+
+## **uniform-drops**
+
+Defines a randomly calculated series of drops within a rectangled box
+
+**xc yc xsid ysid angle \[ rgb \] cnt drad uniform-drops**
+
+Drops **cnt** paint drops with radius **drad** in a uniform distribution in a
+**xsid** by **ysid** box centered at **xc, yc** and rotated by **angle**.
+
+## **wiggle** is made more customer friendly:
+
+**angle period ofst depth wiggle**
+
+Applies sinsusoidal wiggle: y = depth sin(360 x/period + ofst)
+
+ 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
+
+## **background** option
+
+This color option for the background is now to typeset like:
+
+**background=\{\[rgb\]\}** or **background=\{\[RGB\]\}**
+
+to be consistent to all other color settings
+
+
+## rgb and RGB color schemes
+
+They are available for these following actions as well:
+
+ drop
+ the 4 -drops actions
+
+## Colors
+
+The colors now set up:
+
+**\[rgb/RGB\]**
+
+or as a series of colors (an array)
+
+One can use as well hexadecimal color constants, like
+
+**(e7cc9b)** or with capital letters **(E7CC9B)**
+
+which are setup in parentheses and not square brackets.
+
+**\[\[rgb/RGB\] \[rgb/RGB\] \[rgb/RGB\] \[rgb/RGB\] ...\]**
+
+## New option **seed**
+
+This is set to *Mathematical Marbling* by default to keep the drops to their
+initial randomly chosen places.
+Made for **Gaussian-drops** and **uniform-drops**.
diff --git a/Master/texmf-dist/doc/generic/pst-marble/README.md b/Master/texmf-dist/doc/generic/pst-marble/README.md
index ea1cd1808c3..2feb8753b57 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/README.md
+++ b/Master/texmf-dist/doc/generic/pst-marble/README.md
@@ -1,6 +1,6 @@
# **README** #
-# pst-marble v. 1.1 #
-# 2019/01/24 #
+# pst-marble v. 1.2 #
+# 2019/02/01 #
Source: pst-marble.tex, pst-marble.sty, pst-marble.pro
Author: Aubrey Jaffer
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf
deleted file mode 100644
index 6c77fe2ed1a..00000000000
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.tex
deleted file mode 100644
index 065139970b1..00000000000
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.tex
+++ /dev/null
@@ -1,59 +0,0 @@
-\documentclass[pstricks]{standalone}
-\usepackage{pst-marble}
-\begin{document}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
- viscosity=1000,
-%% Background color goes here:
- background=0.9 0.9 0.9,
-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]
-},
-actions={
- 0 0 600 colors 4 get drop
- -200 -90 100 colors 5 get drop
- -200 -200 200 colors 0 get drop
- -200 200 200 colors 1 get drop
- 200 -200 200 colors 2 get drop
- 200 200 200 colors 3 get drop
-% Commenting vortex gives a fine result ...
- 0 0 -32e3 750 vortex
- 250 0 [ 120 80 ] 20 -100 20 stir
- 0 -500 850 -30 15 colors 2 get 5 50 arc-drops
- 0 -500 840 -30 16 colors 1 get 5 50 arc-drops
- 0 -500 850 -30 15 colors 5 get 5 50 arc-drops
- 0 0 150 0 15 10 [105 160 99] 35 20 spiral-drops
-}]
-\psMarble[
- viscosity=1000,drawcontours,linewidth=0.2,linecolor=black,bckg=false,
-%% Background color goes here:
- background=0.9 0.9 0.9,
-colors={
- [0 0 0]
- [0 0 0]
- [0 0 0]
- [0 0 0]
- [0 0 0]
- [0 0 0]
-},
-actions={
- 0 0 600 colors 4 get drop
- -200 -90 100 colors 5 get drop
- -200 -200 200 colors 0 get drop
- -200 200 200 colors 1 get drop
- 200 -200 200 colors 2 get drop
- 200 200 200 colors 3 get drop
- 0 0 -32e3 750 vortex
- 250 0 [ 120 80 ] 20 -100 20 stir
- 0 -500 850 -30 15 colors 2 get 5 50 arc-drops
- 0 -500 840 -30 16 colors 1 get 5 50 arc-drops
- 0 -500 850 -30 15 colors 5 get 5 50 arc-drops
- 0 0 150 0 15 10 colors 5 get 35 20 spiral-drops
-}]
-\end{pspicture}
-\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdf
deleted file mode 100644
index 46de02ea5e4..00000000000
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.tex
deleted file mode 100644
index b92d26651d0..00000000000
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.tex
+++ /dev/null
@@ -1,29 +0,0 @@
-\documentclass[pstricks]{standalone}
-\usepackage{pst-marble}
-\begin{document}
-\begin{pspicture}(-6,-6)(6,6)
-\psMarble[
- viscosity=-1000,%drawcontours,
-%bckg=false,
-%% Background color goes here:
- background=0.9 0.9 0.9,
-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]
-},
-actions={%1.2 1.2 scale
- 0 0 35 colors 35 concentric-rings
- 0 350 shift
- 180 [ 20 50 25 tines ] 40 200 31 rake
- 90 {0.75 mul sin -120 mul} wiggle
- 180 [ 3 600 -150 tines ] 40 200 31 rake
- 90 {0.75 mul sin 240 mul} wiggle
- 180 [ 3 600 150 tines ] 40 200 31 rake
- 90 {0.75 mul sin -120 mul} wiggle
-}](12,12)
-\end{pspicture}
-\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdf
index 856bdfb0ea0..d463f746e22 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdf
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex
index 2ca19db5146..f35ae1d94f9 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex
@@ -3,17 +3,16 @@
\begin{document}
\begin{pspicture}(-5,-7)(5,7)
\psMarble[
- background=1 1 0.9,
+ background={[1 1 0.9]},
colors={
[0.98 0.89 0.56]
[0.357 0.525 0.13]
[0.2 0.05 0.015]
[0.07 0.41 0.255]
[0.87 0.63 0.051]
-[0.98 0.89 0.56]
},
actions={
-0 100 50 colors 25 concentric-rings
+0 100 50 colors 25 concentric-rings
/signe 1 def
100 100 1000 {/radius exch def
0 0 [radius] 10 60 signe mul 50 stir
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf
index 071c15e62d4..9864c4d0b0e 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex
index ad98b6f4a3e..8abe4eaf6a0 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex
@@ -9,7 +9,6 @@ colors={
[0.2 0.05 0.015]
[0.07 0.41 0.255]
[0.87 0.63 0.051]
-[0.98 0.89 0.56]
},
actions={
0 0 45 colors 26 concentric-rings
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf
index dd3076a2f9f..cbe6a62c06b 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex
index f30edbfb9be..54afca3036a 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex
@@ -3,16 +3,17 @@
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
- background=1 1 1,
+ background={[1 1 1]},
actions={
-40 [0 0 1] 30 random-drops
-25 [1 0 0] 40 random-drops
-30 [1 1 1] 25 random-drops
+0 0 100 0 1 [0 0 1] 40 30 Gaussian-drops
+0 0 200 0 1 [1 0 0] 25 40 Gaussian-drops
+0 0 300 0 1 [1 1 1] 30 25 Gaussian-drops
45 [11 100 0 tines] 50 100 30 rake
--45 {5 mul sin 50 mul} wiggle
-45 {5 mul sin 50 mul} wiggle
+-45 1800 0 50 wiggle
+45 1800 0 50 wiggle
250 250 [275] -10 60 30 stir
-250 -250 [275] 10 60 30 stir
}](10,10)
\end{pspicture}
-\end{document} \ No newline at end of file
+\end{document}
+0 0 100 0 [0 0 1] 40 30 Gaussian-drops \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf
index e0e4d2fc191..ffa093d7922 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf
index 1f6707935b5..7b13d7c038b 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex
index cc32df20707..30d1125cafd 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex
@@ -3,11 +3,11 @@
\begin{document}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
- background=1 1 1,
+ background={[1 1 1]},
actions={
-40 [0 0 0] 30 random-drops
-30 [1 0 0] 25 random-drops
-25 [1 1 0] 40 random-drops
+0 0 200 0 1 [0 0 0] 40 30 Gaussian-drops
+0 0 300 0 1 [1 0 0] 25 40 Gaussian-drops
+0 0 500 0 1 [1 1 0] 35 25 Gaussian-drops
45 [11 100 0 tines] 50 100 30 rake
-45 {5 mul sin 50 mul} wiggle
250 250 -32e3 10 vortex
diff --git a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf
index b48029536e3..65afcdf9fef 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf
Binary files differ
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 de4eac0b010..290f3e47d92 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
@@ -37,7 +37,7 @@
oneside,
dvipsnames,
svgnames,
- x11names
+ x11names,
]{pst-doc}
\usepackage[autostyle]{csquotes}
@@ -46,15 +46,15 @@
\addbibresource{pst-marble-doc.bib}
\usepackage[utf8]{inputenc}
\let\pstpersFV\fileversion
-\usepackage{pstricks,pst-marble,pst-lens,pstricks-add}
-\usepackage{amsmath,amssymb}
+\usepackage{pst-marble,pst-lens,pstricks-add}
+\usepackage{amsmath,amssymb,animate}
\let\belowcaptionskip\abovecaptionskip
\parindent0pt
\begin{document}
-\title{pst-marble v 1.1}
+\title{pst-marble v 1.2}
\subtitle{A PSTricks package to draw marble-like patterns}
\author{%
Aubrey \textsc{Jaffer}\\
@@ -79,41 +79,49 @@ Marbling originated in Asia as a decorative art more than 800 years ago and spre
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}
-\begin{pspicture}(-7,-5)(5,5)
-\psMarble[viscosity=1000,background=0.9 0.9 0.9,
- 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]},
-actions={
- 0 0 35 colors 35 concentric-rings
- 0 350 shift
- 180 [ 20 50 25 tines ] 40 200 31 rake
- 90 {0.75 mul sin -120 mul} wiggle
- 180 [ 3 600 -150 tines ] 40 200 31 rake
- 90 {0.75 mul sin 240 mul} wiggle
- 180 [ 3 600 150 tines ] 40 200 31 rake
- 90 {0.75 mul sin -120 mul} wiggle
-}]
-\psframe(-7,-5)(5,5)
-\rput{90}(-6,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
+\begin{pspicture}(-8,-6)(6,6)
+\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]
+ },
+ actions={
+ 0 0 24 colors 36 concentric-rings
+ 0 350 shift
+ 180 [ 20 50 25 tines ] 40 200 31 rake
+ 90 270 0 -120 wiggle
+ 180 [ 3 600 -150 tines ] 40 200 31 rake
+ 90 270 0 240 wiggle
+ 180 [ 3 600 150 tines ] 40 200 31 rake
+ 90 270 0 -120 wiggle
+ }
+ ](12,12)
+\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}(-7,-5)(5,5)
-\psMarble[viscosity=1000,background=0.9 0.9 0.9,
- 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]},
-actions={
- 0 0 35 colors 35 concentric-rings
- 0 350 shift
- 180 [ 20 50 25 tines ] 40 200 31 rake
- 90 {0.75 mul sin -120 mul} wiggle
- 180 [ 3 600 -150 tines ] 40 200 31 rake
- 90 {0.75 mul sin 240 mul} wiggle
- 180 [ 3 600 150 tines ] 40 200 31 rake
- 90 {0.75 mul sin -120 mul} wiggle
-}]
-\psframe(-7,-5)(5,5)
-\rput{90}(-6,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
+\begin{pspicture}(-8,-6)(6,6)
+\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]
+ },
+ actions={
+ 0 0 24 colors 36 concentric-rings
+ 0 350 shift
+ 180 [ 20 50 25 tines ] 40 200 31 rake
+ 90 270 0 -120 wiggle
+ 180 [ 3 600 -150 tines ] 40 200 31 rake
+ 90 270 0 240 wiggle
+ 180 [ 3 600 150 tines ] 40 200 31 rake
+ 90 270 0 -120 wiggle
+ }
+ ](12,12)
+\psframe(-8,-6)(6,6)
+\rput{90}(-7,0){\parbox{10cm}{\centering\bf\Large Marbling effects by Aubrey Jaffer\\ and PSTricks}}
\end{pspicture}
\end{verbatim}}
@@ -128,20 +136,20 @@ actions={
\section{Introduction}
-Aubrey Jaffer finds a similarity between whirlwinds in the great spot of jupiter and those that appear in some marbled papers.
-\begin{center}
-\url{http://voluntocracy.blogspot.com/2018/08/}
-\end{center}
-You can see a swirl on a marbled paper at Wikipedia:
-\begin{center}
-\url{https://fr.wikipedia.org/wiki/Papier_marbr%C3%A9#/media/File:PaperMarbling003France1880Detail.jpg}
-\end{center}
-
-It is true that in both cases, although at very different scales, the laws of fluid mechanics apply.
+%Aubrey Jaffer finds a similarity between whirlwinds in the great spot of jupiter and those that appear in some marbled papers.
+%\begin{center}
+%\url{http://voluntocracy.blogspot.com/2018/08/}
+%\end{center}
+%You can see a swirl on a marbled paper at Wikipedia:
+%\begin{center}
+%\url{https://fr.wikipedia.org/wiki/Papier_marbr%C3%A9#/media/File:PaperMarbling003France1880Detail.jpg}
+%\end{center}
+%
+%It is true that in both cases, although at very different scales, the laws of fluid mechanics apply.
Aubrey Jaffer's article on the physical and mathematical interpretation of the formation of various types of marbling:
\begin{center}
-\url{https://arxiv.org/abs/1702.02106}
+\url{https://arxiv.org/abs/1810.04646}
\end{center}
Aubrey Jaffer has improved the model shown in the previous version of \texttt{pst-marble}. Now it is closer to reality and more consistent in the choice of units. This version allows to perform more accurate simulations, however with some new parameters, which will be explained.
@@ -187,10 +195,10 @@ Aubrey Jaffer retains 1 global parameter: the dynamic viscosity, see in particul
There are 12 types of actions defined and ready to use:
\begin{verbatim}
drop
- arc-drops
- spiral-drops
- random-drops
- random-drops-colors
+ line-drops
+ coil-drops
+ Gaussian-drops
+ uniform-drops
concentric-rings
rake
stroke
@@ -227,11 +235,11 @@ The documentation contains, of course, some more other information than within t
\subsection{Drop paint}
-The first drop of paint placed within water forms a circle with the area $a$. If a second drop with the area $b$ is placed within the center of the first drop, the total area increases from $a$ to $a+b$. For the first drop, points very close to the center will change from an infinitely small radius to a radius $\sqrt{b/\pi}$; and the points on the border of the circle will change from $\sqrt{a/\pi}$ to $\sqrt{(a+b)/\pi)} $. If we take 2 drops of different colors, this gives:
+The first drop of paint placed within water forms a circle with the area $a$. If a second drop with the area $b$ is placed within the center of the first drop, the total area increases from $a$ to $a+b$. For the first drop, points very close to the center will change from an infinitely small radius to a radius $\sqrt{b/\pi}$; and the points on the border of the circle will change from $\sqrt{a/\pi}$ to $\sqrt{(a+b)/\pi)} $. If we take 2 or more drops of different colors, this gives:
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 100 [0 0 1] drop
}
@@ -241,7 +249,7 @@ The first drop of paint placed within water forms a circle with the area $a$. If
%\hfill
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 200 [0 0 1] drop
0 0 150 [1 0 0] drop
@@ -252,10 +260,11 @@ The first drop of paint placed within water forms a circle with the area $a$. If
%\hfill
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 200 [0 0 1] drop
0 0 150 [1 0 0] drop
+ 0 0 100 [0 1 0] drop
}
](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
@@ -276,7 +285,7 @@ $P(x,y)$ is a point of the first drop and $P'(x',y')$ the transformed point.
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 150 [0 0 1] drop
}
@@ -287,7 +296,7 @@ $P(x,y)$ is a point of the first drop and $P'(x',y')$ the transformed point.
\hspace{1cm}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 150 [0 0 1] drop
-250 0 150 [1 0 0] drop
@@ -302,7 +311,7 @@ If a third drop is placed, the two previous drops will then be influenced by the
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 150 [0 0 1] drop
}
@@ -312,7 +321,7 @@ If a third drop is placed, the two previous drops will then be influenced by the
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 150 [0 0 1] drop
-250 0 150 [1 0 0] drop
@@ -324,7 +333,7 @@ If a third drop is placed, the two previous drops will then be influenced by the
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psMarble[viscosity=120,
- background=1 1 1,
+ background={[1 1 1]},
actions={
0 0 150 [0 0 1] drop
-250 0 150 [1 0 0] drop
@@ -357,48 +366,26 @@ The following example illustrates that technique. Three steps with drops of diff
\begin{pspicture}(-3,-4)(3,4)
\psMarble[%
actions={
- 250 {
- random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 30 [0.960 0.764 0.576] drop
- } repeat
- 200 {
- random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 25 [0.270 0.035 0.058] drop
- } repeat
- 100 {
- random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 20 [0.866 0.353 0.000] drop
- } repeat
- 300 200 -32e2 750 vortex
- 0 -300 32e2 750 vortex }](6,8)
+ 0 0 1000 1000 0 [0.960 0.764 0.576] 125 30 uniform-drops
+ 0 0 1000 1000 0 [0.270 0.035 0.058] 100 25 uniform-drops
+ 0 0 1000 1000 0 [0.866 0.353 0.000] 150 20 uniform-drops
+ 300 200 -32e2 750 vortex
+ 0 -300 32e2 750 vortex
+ }](6,8)
\end{pspicture}
\end{minipage}
\hfill
-\begin{minipage}[t]{10cm}\kern0pt
+\begin{minipage}[t]{11cm}\kern0pt
{\small\begin{verbatim}
\begin{pspicture}(-3,-4)(3,4)
\psMarble[%
actions={
- 250 {
- random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 30 [0.960 0.764 0.576] drop
- } repeat
- 200 {
- random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 25 [0.270 0.035 0.058] drop
- } repeat
- 100 {
- random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 20 [0.866 0.353 0.000] drop
- } repeat
- 300 200 -32e2 750 vortex
- 0 -300 32e2 750 vortex }](6,8)
+ 0 0 1000 1000 0 [0.960 0.764 0.576] 125 30 uniform-drops
+ 0 0 1000 1000 0 [0.270 0.035 0.058] 100 25 uniform-drops
+ 0 0 1000 1000 0 [0.866 0.353 0.000] 150 20 uniform-drops
+ 300 200 -32e2 750 vortex
+ 0 -300 32e2 750 vortex
+ }](6,8)
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -439,7 +426,7 @@ The boundaries between virtual paint rings will be traversed using the Minsky ci
\Lcs{psMarble}\OptArgs\Largr{x , y}
\end{BDef}
-The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{background=}, \nxLkeyword{bckg=true/false}, \nxLkeyword{viscosity=}, \nxLkeyword{drawcontours=true/false} and \nxLkeyword{colors=}.
+The command \Lcs{psMarble} contains the options \nxLkeyword{actions=}, \nxLkeyword{background=}, \nxLkeyword{seed=}, \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}.
@@ -449,17 +436,22 @@ The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimensio
\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\\
+\Lkeyword{background} & [0 0 0] & 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{bckg} & true & Boolean: to turn on/off the background color\\
\Lkeyword{colors} & \parbox{5cm}{
- [0.960 0.764 0.576]
- [0.316 0.362 0.298]
- [0.200 0.050 0.015]
- [0.023 0.145 0.451]
- [0.866 0.353 0.050]
- [0.200 0.050 0.015]
+ [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 to be set within the rgb-color-system\\
+ & Colors of the marbling can be set within the rgb-color-system or as hexadecimal color constants\\
\Lkeyword{drawcontours} & false & Boolean: if set to \texttt{true}, it only draws the contours\\
\Lkeyword{viscosity} & 1000 & Global primitive: viscosity of the system---if taken negative pixeled image\\
\bottomrule
@@ -474,15 +466,10 @@ The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimensio
\item If \texttt{viscosity<0}, the image will be pixeled, if set to positive values it will be non-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 All colors need to be setup within the rgb-color-system.
-
- If one has a color from another color system, for example:
-
- \texttt{0.5 1 1 sethsbcolor} it is sufficient to just add \texttt{currentrgbcolor} at its end, like
-
- \texttt{0.5 1 1 sethsbcolor currentrgbcolor} to get the equivalent within the rgb-color-system.
-\item For \texttt{background} one can use either rgb or RGB: \texttt{background=0.2 0.5 0.7} or \texttt{background=2 255 2}. The same can be done within the \texttt{drop}, \texttt{arc-drops}, \texttt{spiral-drops} actions.
-\item Following are introduced some basic actions, like \texttt{drop}, \texttt{arc-drops}, \texttt{spiral-drops}, \texttt{random-drops}, \texttt{random-drops-colors}, \texttt{concentric-rings}, \texttt{rake}, \texttt{stroke}, \texttt{stir}, \texttt{vortex}, \texttt{wiggle} and \texttt{shift}.
+\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 parenthese 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{coil-drops}, \texttt{Gaussian-drops}, \texttt{uniform-drops}, \texttt{concentric-rings}, \texttt{rake}, \texttt{stroke}, \texttt{stir}, \texttt{vortex}, \texttt{wiggle} and \texttt{shift}.
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}
@@ -596,7 +583,7 @@ All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword
\myPrint{printcolorA}{0.275 0.569 0.796} &
\myPrint{printcolorB}{0.965 0.882 0.302} &
\myPrint{printcolorC}{0.176 0.353 0.129} &
-\myPrint{printcolorD}{0.176 0.353 0.129} &
+\myPrint{printcolorD}{0.635 0.008 0.094} &
\myPrint{printcolorE}{0.078 0.165 0.518} \\
\myPrint{printcolorF}{0.824 0.592 0.031} &
\myPrint{printcolorG}{0.059 0.522 0.392} &
@@ -629,7 +616,7 @@ This initially is a circle with its center at \texttt{(cx,cy)} and a radius \tex
In order to interpolate the color in reverse-rendering, the adjacent color must be known.
\begin{center}
\begin{pspicture}(-3,-3)(3,3)
-\psMarble[background=1 1 1, %white
+\psMarble[background={[1 1 1]}, %white
actions={%
0 0 50 [1 0 0] drop
-200 0 70 [0 1 0] drop
@@ -639,7 +626,7 @@ actions={%
\end{center}
\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
-\psMarble[background=1 1 1, %white
+\psMarble[background={[1 1 1]}, %white
actions={%
0 0 50 [1 0 0] drop
-200 0 70 [0 1 0] drop
@@ -649,220 +636,263 @@ actions={%
\end{verbatim}
\textbf{Note:} The paint drop top most on the stack is left undeformed (intact), whereas all the others are influenced by each other, according to the system constant. There are as well 6 colors predefined which can be used like that:
\begin{verbatim}
-0 0 50 color1 drop
--200 0 70 color2 drop
-200 0 100 color3 drop
+0 0 50 colors 1 get drop
+-200 0 70 colors 2 get drop
+200 0 100 colors 3 get drop
\end{verbatim}
\newpage
-\subsection{\texttt{arc-drops}}
+\subsection{\texttt{line-drops}}
-\texttt{arc-drops} defines a series of drops along an arc.
\begin{verbatim}
-xc yc r ang-strt ang-step [rgb] cnt drad arc-drops
+xc yc ang [ r ] [ rgb ] drad line-drops
+\end{verbatim}
-cnt Number of drops
-drad Radius of the drops
-rgb Color of the drop series
-xc,yc Center coordinates of the arc
-r Radius of the arc
-ang-strt Starting angle
-ang-step angle step
+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. One drop is placed at each \texttt{r} distance from \texttt{xc, yc}.
+
+For [r] we can use
+\begin{verbatim}
+[ cnt spacing ofst tines ]
\end{verbatim}
+Returns \texttt{cnt} numbers \texttt{spacing} apart with middle element equal to \texttt{ofst}.
-\begin{minipage}[t]{10cm}\kern0pt
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
- viscosity=1000,
- background=0.9 0.9 0.9,
+Used for \texttt{rake} and \texttt{line-drops} command.
+
+\begin{center}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[viscosity=1000,bckg=false,
actions={
- 0 -500 850 -30 15 color2 5 50 arc-drops
- 0 -500 840 -30 16 color1 5 50 arc-drops
- 0 -500 850 -30 15 color5 5 50 arc-drops
+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
}]
-\end{pspicture}
-\end{minipage}
-\hfill
-\begin{minipage}[t]{8cm}\kern0pt
-{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
- viscosity=1000,
- background=0.9 0.9 0.9,
+\rput(0,2.5){%
+\psdot[linecolor=red](0,0)
+\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
+\psline[linecolor=red,linestyle=dashed](0,0)(0,2.5)
+\psline[linecolor=red](-3,0)(3,0)
+\psarcn[linecolor=red]{->}(0,0){2}{90}{0}
+\uput{1cm}[45](0,0){\textcolor{red}{\texttt{ang}}}
+\psline[linecolor=red]{|<->|}(-1.65,0.4)(-0.85,0.4)
+\uput[90](-1.25,0.4){\textcolor{red}{\texttt{spacing}}}
+}
+\rput(0,-2.5){%
+\psdot[linecolor=red](0,0)
+\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
+\psline[linecolor=red](-3,0)(3,0)
+\psline[linecolor=red]{|<->|}(0,0.4)(0.5,0.4)
+\uput[90](0.3,0.4){\textcolor{red}{\texttt{ofst>0}}}
+}
+\end{pspicture*}
+\end{center}
+{\tiny\begin{verbatim}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[viscosity=1000,bckg=false,
actions={
- 0 -500 850 -30 15 color2 5 50 arc-drops
- 0 -500 840 -30 16 color1 5 50 arc-drops
- 0 -500 850 -30 15 color5 5 50 arc-drops
+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
}]
-\end{pspicture}
+\rput(0,2.5){%
+\psdot[linecolor=red](0,0)
+\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
+\psline[linecolor=red,linestyle=dashed](0,0)(0,2.5)
+\psline[linecolor=red](-3,0)(3,0)
+\psarcn[linecolor=red]{->}(0,0){2}{90}{0}
+\uput{1cm}[45](0,0){\textcolor{red}{\texttt{ang}}}
+\psline[linecolor=red]{|<->|}(-1.65,0.4)(-0.85,0.4)
+\uput[90](-1.25,0.4){\textcolor{red}{\texttt{spacing}}}
+}
+\rput(0,-2.5){%
+\psdot[linecolor=red](0,0)
+\uput[-90](0,0){\textcolor{red}{\texttt{xc,yc}}}
+\psline[linecolor=red](-3,0)(3,0)
+\psline[linecolor=red]{|<->|}(0,0.4)(0.5,0.4)
+\uput[90](0.3,0.4){\textcolor{red}{\texttt{ofst>0}}}
+}
+\end{pspicture*}
\end{verbatim}}
-\end{minipage}
\newpage
-\subsection{\texttt{spiral-drops}}
+\subsection{\texttt{coil-drops}}
-\texttt{spiral-drops} defines a series of drops along a spiral.
+\texttt{coil-drops} defines a series of drops along a circle or spiral.
\begin{verbatim}
-xc yc r ang-strt ang-step rinc [rgb] cnt drad spiral-drops
-
-Like arc-drops, but increments (or decrements if negative) r by rinc
-after each drop
+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: if 0 it starts North, if 90 it starts East, ...
+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}
-
-\begin{minipage}[t]{10cm}\kern0pt
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
- viscosity=1000,
- background=0.9 0.9 0.9,
+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.
+\begin{center}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[bckg=false,viscosity=1000,
actions={
- 0 0 -450 0 5 5 [1 1 0] 50 15 spiral-drops
- 100 100 50 0 15 10 [255 0 0] 55 10 spiral-drops
+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
}]
-\end{pspicture}
-\end{minipage}
-\hfill
-\begin{minipage}[t]{8cm}\kern0pt
-{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
- viscosity=1000,
- background=0.9 0.9 0.9,
+\end{pspicture*}
+\end{center}
+{\tiny\begin{verbatim}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[bckg=false,viscosity=1000,
actions={
- 0 0 -450 0 5 5 [1 1 0] 50 15 spiral-drops
- 100 100 50 0 15 10 [255 0 0] 55 10 spiral-drops
+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
}]
-\end{pspicture}
+\end{pspicture*}
\end{verbatim}}
-\end{minipage}
\newpage
-\subsection{\texttt{random-drops}}
-
-With \texttt{random-drops}, we randomly place drops onto a liquid surface within an area of (1 m $\times$ 1 m) with also randomly varying radii.
-
-The varying radii of the drops are calculated with: $r=(\text{size (in mm)})\cdot \text{e}^{x}$, with: $\text{e}=2.71828182$ and $0<x<1$.
-
-So the radii will vary between $r_\text{min}=\text{size}$ and $r_\text{max}=2.71828182\cdot \text{size}$
+\subsection{\texttt{Gaussian-drops}}
+\texttt{Gaussian-drops} defines a randomly calculated series of drops mostly within a circle/ellipse.
\begin{verbatim}
-size [ color ] count random-drops
-
-count Number of the drops
-size Size of the drops
-color Color of the drops
+xc yc r ang eccentricity [ rgb ] cnt drad Gaussian-drops
\end{verbatim}
-\textbf{Note:} If we choose a large number of drops, the compilation time increases.
-
-\medskip
-
-\textbf{Example 1:}
-
-\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,background=1 1 1,
- actions={
-% size color count
- 50 [1 0 0] 10 random-drops
- }](10,10)
-\end{pspicture}
-\end{center}
-{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- actions={
-% size color count
- 50 [1 0 0] 10 random-drops
- }](10,10)
-\end{pspicture}
-\end{verbatim}}
-
-\newpage
+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 and length to width ratio \texttt{eccentricity} (1 is circular).
-\textbf{Example 2:}
+\texttt{[rgb]} can be one color or a color series.
+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.
\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- actions={
-% size color count
- 50 [1 0 0] 10 random-drops
-% size color count
- 20 [0 0 1] 50 random-drops
-% size color count
- 15 [0 1 0] 100 random-drops
- }](10,10)
-\end{pspicture}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[bckg=false,viscosity=1000,
+colors={
+[0.960 0.764 0.576][0.316 0.362 0.298]
+[0.200 0.050 0.015][0.023 0.145 0.451]
+[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
+}]
+\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){%
+\psellipse[linecolor=red](0,0)(!1 2 mul 1 2 div)
+\psline[linestyle=dashed,linecolor=red](!1 2 mul neg 0)(!1 2 mul 0)
+\psline[linestyle=dashed,linecolor=red](!0 1 2 div neg)(!0 1 2 div)
+}
+\psline[linecolor=red](-3,0)(-3,4)
+\psarcn[linecolor=red]{->}(-3,0){2.5}{90}{60}
+\uput{2cm}[75](-3,0){\textcolor{red}{\texttt{ang}}}
+\end{pspicture*}
\end{center}
-{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- actions={
-% size color count
- 50 [1 0 0] 10 random-drops
-% size color count
- 20 [0 0 1] 50 random-drops
-% size color count
- 15 [0 1 0] 100 random-drops
- }](10,10)
-\end{pspicture}
+{\tiny\begin{verbatim}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[bckg=false,viscosity=1000,
+colors={
+[0.960 0.764 0.576][0.316 0.362 0.298]
+[0.200 0.050 0.015][0.023 0.145 0.451]
+[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
+}]
+\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){%
+\psellipse[linecolor=red](0,0)(!1 2 mul 1 2 div)
+\psline[linestyle=dashed,linecolor=red](!1 2 mul neg 0)(!1 2 mul 0)
+\psline[linestyle=dashed,linecolor=red](!0 1 2 div neg)(!0 1 2 div)
+}
+\psline[linecolor=red](-3,0)(-3,4)
+\psarcn[linecolor=red]{->}(-3,0){2.5}{90}{60}
+\uput{2cm}[75](-3,0){\textcolor{red}{\texttt{ang}}}
+\end{pspicture*}
\end{verbatim}}
\newpage
-\subsection{\texttt{random-drops-colors}}
-
-With \texttt{random-drops-colors}, we randomly place drops onto a liquid surface within an area of (1 m $\times$ 1 m) with also randomly varying radii and randomly chosen colors.
-
-The varying radii of the drops are calculated with: $r=(\text{size (in mm)})\cdot \text{e}^{x}$, with: $\text{e}=2.71828182$ and $0<x<1$.
-
-So the radii will vary between $r_\text{min}=\text{size}$ and $r_\text{max}=2.71828182\cdot \text{size}$
-
-The varying colors are calculated with:
-
-\verb+[background colors random:uniform colors length mul floor cvi get /drop]+
+\subsection{\texttt{uniform-drops}}
+\texttt{uniform-drops} defines a randomly calculated series of drops within a rectangled box.
\begin{verbatim}
-size count random-drops-colors
-
-count Number of the drops
-size Size of the drops
+xc yc xsid ysid angle [ rgb ] cnt drad uniform-drops
\end{verbatim}
-\textbf{Example:}
+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}.
+\texttt{[rgb]} can be one color or a color series.
\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- actions={
-% size count
- 40 10 random-drops-colors
- 25 20 random-drops-colors
- 15 50 random-drops-colors
- }](10,10)
-\end{pspicture}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[viscosity=1000,bckg=false,
+ 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]},
+actions={
+0 0 200 200 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 65 10 uniform-drops
+-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 400 50 45 colors 5 get 30 8 uniform-drops
+}]
+\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}}
+\psdot[linecolor=red](0,0)
+\rput(-3,-2){\psframe(-0.75,-1)(0.75,1)}
+\psline[linecolor=red]{|<->|}(-3.75,-3.2)(-2.25,-3.2)\uput[-90](-3,-3.2){\textcolor{red}{150}}
+\psline[linecolor=red]{|<->|}(-2.05,-3)(-2.05,-1)\uput[0](-2.05,-2){\textcolor{red}{200}}
+\psdot[linecolor=red](-3,-2)
+\rput(1,3){\psframe(-2,-0.25)(2,0.25)}
+\psline[linecolor=red]{|<->|}(-1,2.5)(3,2.5)\uput[-90](1,2.5){\textcolor{red}{400}}
+\psline[linecolor=red]{|<->|}(3.25,2.75)(3.25,3.25)\uput[0](3.25,3){\textcolor{red}{50}}
+\psdot[linecolor=red](1,3)
+\rput{45}(-2,3){\psframe(-2,-0.25)(2,0.25)}
+\end{pspicture*}
\end{center}
-{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- actions={
-% size count
- 40 10 random-drops-colors
- 25 20 random-drops-colors
- 15 50 random-drops-colors
- }](10,10)
-\end{pspicture}
+{\footnotesize\begin{verbatim}
+\begin{pspicture*}(-5,-5)(5,5)
+\psgrid[subgriddiv=1,gridcolor=lightgray!10]
+\psMarble[viscosity=1000,bckg=false,
+ 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]},
+actions={
+0 0 200 200 0 [[0.176 0.353 0.129][0.635 0.008 0.094][0.078 0.165 0.518]] 65 10 uniform-drops
+-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 400 50 45 colors 5 get 30 8 uniform-drops
+}]
+\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}}
+\psdot[linecolor=red](0,0)
+\rput(-3,-2){\psframe(-0.75,-1)(0.75,1)}
+\psline[linecolor=red]{|<->|}(-3.75,-3.2)(-2.25,-3.2)\uput[-90](-3,-3.2){\textcolor{red}{150}}
+\psline[linecolor=red]{|<->|}(-2.05,-3)(-2.05,-1)\uput[0](-2.05,-2){\textcolor{red}{200}}
+\psdot[linecolor=red](-3,-2)
+\rput(1,3){\psframe(-2,-0.25)(2,0.25)}
+\psline[linecolor=red]{|<->|}(-1,2.5)(3,2.5)\uput[-90](1,2.5){\textcolor{red}{400}}
+\psline[linecolor=red]{|<->|}(3.25,2.75)(3.25,3.25)\uput[0](3.25,3){\textcolor{red}{50}}
+\psdot[linecolor=red](1,3)
+\rput{45}(-2,3){\psframe(-2,-0.25)(2,0.25)}
+\end{pspicture*}
\end{verbatim}}
@@ -871,27 +901,27 @@ size Size of the drops
\subsection{\texttt{concentric-rings}}
-With \texttt{concentric-rings}, we set the number of different colored concentric rings (\texttt{number of rings}) (at center \texttt{cx,cy}) with a \texttt{radius increment}.
-
-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}
+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:}
%
@@ -905,27 +935,19 @@ The original PostScript code we find within \texttt{pst-marble.pro} as:
%
%A last single drop is then added with the radius of \texttt{r=rinc/2}.
-
-
To code it within the \LaTeX{} file we use the following syntax:
\begin{verbatim}
xc yc thick [ color ] count concentric-rings
cx, cy Center coordinates
-thick Multiplication coefficient between the bands
-count Number of the elements within
- the [array of colors] list
- [array of colors]: this is the list of colors
- within the colors= key
+thick Thickness of the rings
+count Number of rings
+color Array of colors: [[rgb/RGB][rgb/RGB]...[rgb/RGB]]
\end{verbatim}
-
-\newpage
-
-
\textbf{Example 1:}
-\texttt{concentric-rings} is the default action of the \texttt{actions=\{...\}} key, meaning if \textbf{no} action is chosen, \texttt{concentric-rings} with its default radius increment and its default color list is in effect.
+\texttt{concentric-rings} is the default action of the \texttt{actions=\{...\}} key, meaning if \textbf{no} action is chosen, \texttt{concentric-rings} with its default thickness and its default color list is in effect.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble(10,10)
@@ -983,7 +1005,6 @@ If we like to change the colors as well, we do this with the \texttt{colors=\{..
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
- background=0.9 0.9 0.9,
colors={
[0.08 0.3 0.51]
[0.18 0.76 1]
@@ -1000,7 +1021,6 @@ If we like to change the colors as well, we do this with the \texttt{colors=\{..
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
- background=0.9 0.9 0.9,
colors={
[0.08 0.3 0.51]
[0.18 0.76 1]
@@ -1132,17 +1152,12 @@ The stylus parameter \texttt{D} (given in mm) is the ratio of its submerged volu
\begin{center}
\psscalebox{0.8}{%
\begin{pspicture*}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
-linewidth=0.1,
-bckg=false,
-drawcontours,
-actions={30 -2 2
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0 0 0] drop
- } for
+\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
+colors={[0 0 0]},
+actions={
+0 0 70 colors 26 concentric-rings
% angle r V tU D
- 45 [200] 20 -100 50 rake
+45 [200] 20 -100 50 rake
}](10,10)%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
@@ -1158,13 +1173,11 @@ actions={30 -2 2
{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
-actions={30 -2 2
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0 0 0] drop
- } for
+colors={[0 0 0]},
+actions={
+0 0 70 colors 26 concentric-rings
% angle r V tU D
- 45 [200] 20 -100 50 rake
+45 [200] 20 -100 50 rake
}](10,10)%
\psline[linecolor=red](-5,-5)(5,5)
\rput(!2 sqrt 2 sqrt neg){\psline[linecolor=blue](-5,-5)(5,5)}
@@ -1198,11 +1211,9 @@ The stylus parameter \texttt{D} (given in mm) is set to 50 mm.
\psscalebox{0.8}{%
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
-actions={30 -2 2
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0 0 0] drop
- } for
+colors={[0 0 0]},
+actions={
+0 0 70 colors 26 concentric-rings
% angle r V tU D
45 [200] 20 100 50 rake
}](10,10)%
@@ -1220,11 +1231,9 @@ actions={30 -2 2
{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
-actions={30 -2 2
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0 0 0] drop
- } for
+colors={[0 0 0]},
+actions={
+0 0 70 colors 26 concentric-rings
% angle r V tU D
45 [200] 20 100 50 rake
}](10,10)%
@@ -1494,15 +1503,16 @@ Setting: \verb! 0 0 [ 350 ] 10 70 10 stir !
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
+ 0 0 35 colors 32 concentric-rings
0 -100 [200] 10 60 30 stir
}](10,10)
\psdot[dotstyle=+,linecolor=white,linewidth=2pt](0,-1)
@@ -1516,15 +1526,16 @@ Setting: \verb! 0 0 [ 350 ] 10 70 10 stir !
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
+ 0 0 35 colors 32 concentric-rings
0 -100 [200] 10 60 30 stir
}](10,10)
\psdot[dotstyle=+,linecolor=white,linewidth=2pt](0,-1)
@@ -1547,16 +1558,20 @@ If the artist repeats the same gesture several times, a whirlwind effect is crea
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 5{0 -100 [200] 10 60 30 stir} repeat
+ 0 0 35 colors 32 concentric-rings
+ 0 -100 [200] 10 60 30 stir
+ 0 -100 [200] 10 60 30 stir % repeated action
+ 0 -100 [200] 10 60 30 stir % repeated action
+ 0 -100 [200] 10 60 30 stir % repeated action
}](10,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
@@ -1564,16 +1579,20 @@ If the artist repeats the same gesture several times, a whirlwind effect is crea
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 5{0 -100 [200] 10 60 30 stir} repeat
+ 0 0 35 colors 32 concentric-rings
+ 0 -100 [200] 10 60 30 stir
+ 0 -100 [200] 10 60 30 stir % repeated action
+ 0 -100 [200] 10 60 30 stir % repeated action
+ 0 -100 [200] 10 60 30 stir % repeated action
}](10,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
@@ -1592,34 +1611,38 @@ The artist turns from two different centers, changing the direction of rotation.
\begin{minipage}[t]{8cm}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 0 200 [200] 10 60 30 stir
- 0 -200 [200] -10 60 30 stir
+ 0 0 35 colors 32 concentric-rings
+ 0 200 [200] 10 60 30 stir
+ 0 -200 [200] -10 60 30 stir
}](8,10)
+\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 0 200 [200] 10 60 30 stir
- 0 -200 [200] -10 60 30 stir
+ 0 0 35 colors 32 concentric-rings
+ 0 200 [200] 10 60 30 stir
+ 0 -200 [200] -10 60 30 stir
}](8,10)
+\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -1627,34 +1650,38 @@ The artist turns from two different centers, changing the direction of rotation.
\begin{minipage}[t]{8cm}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
+ 0 0 35 colors 32 concentric-rings
0 -200 [200] -10 60 30 stir
0 200 [200] 10 60 30 stir
}](8,10)
+\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
+ colors={
+ [0.08 0.3 0.51]
+ [0.18 0.76 1]
+ [0.93 1 1]
+ [0.08 0.3 0.51]
+ [0.8 0.75 0.82]
+ [1 0.99 0.65]
+ },
actions={
- 9 -1 3
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
+ 0 0 35 colors 32 concentric-rings
0 -200 [200] -10 60 30 stir
0 200 [200] 10 60 30 stir
}](8,10)
+\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -1685,36 +1712,70 @@ The documentation illustrates the used parameters:
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 proofed within an animation to be compiled by the following verbatim code:
+After a long enough time, the whole surface returns to its initial state. This can be easily proofed within an animation.
-\begin{verbatim}
-\documentclass{article}
-\usepackage{pst-marble,animate}
-\begin{document}
+Here the animation code for the \texttt{animate} package by Alexander Grahn:
+
+\begin{minipage}[t]{10cm}\kern0pt
\begin{animateinline}[%
- controls,palindrome,
+ controls,loop,
begin={\begin{pspicture}(-5,-5)(5,5)},
end={\end{pspicture}}
]{5}% 5 image/s
\multiframe{20}{rA=-3+0.65}{%
\psMarble[
+ colors={
+ (622e07)
+ (c06d11)
+ (8f6e1d)
+ (56410d)
+ (191504)
+ },
actions={%
0 0 40 colors 30 concentric-rings
- 0 0 20 color1 drop
- 90 [3 400 24 tines] 40 200 31 rake
+ 90 [3 400 24 tines] 40 200 31 rake
-90 [3 400 24 tines] 40 200 31 rake
- 0 0 -25200 5 \rA\space exp vortex
- }](10,10)
+ 0 0 -25200 5 \rA\space exp vortex
+ }](10,10)
}
\end{animateinline}
+\end{minipage}
+\begin{minipage}[t]{8cm}\kern0pt
+{\footnotesize\begin{verbatim}
+\begin{document}
+\begin{animateinline}[%
+controls,loop,
+begin={\begin{pspicture}(-5,-5)(5,5)},
+end={\end{pspicture}}
+]{5}% 5 image/s
+\multiframe{20}{rA=-3+0.65}{%
+\psMarble[
+colors={
+(622e07)
+(c06d11)
+(8f6e1d)
+(56410d)
+(191504)},
+actions={%
+0 0 40 colors 30 concentric-rings
+90 [3 400 24 tines] 40 200 31 rake
+-90 [3 400 24 tines] 40 200 31 rake
+0 0 -25200 5 \rA\space exp vortex
+}](10,10)
+}
+\end{animateinline}
\end{document}
-\end{verbatim}
+\end{verbatim}}
+\end{minipage}
+
+\bigskip
Animated gifs can be seen at:
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/}
\end{center}
+
\newpage
@@ -1722,42 +1783,36 @@ Animated gifs can be seen at:
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- background=1 1 1,
+\psMarble[viscosity=1000,background={[1 1 1]},
+ colors={
+ (622e07)
+ (c06d11)
+ (8f6e1d)
+ (56410d)
+ (191504)
+ },
actions={
- 9 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.08 0.30 0.51] drop
- 0 0 rad [0.18 0.76 1.00] drop
- 0 0 rad [0.93 1.00 1.00] drop
- 0 0 rad [0.08 0.30 0.51] drop
- 0 0 rad [0.80 0.75 0.82] drop
- 0 0 rad [1.00 0.99 0.65] drop
- } for
- 90 100 shift
- 0 0 -32e3 10 vortex
- }](10,10)
+ 0 0 35 colors 33 concentric-rings
+ 90 100 shift
+ 0 0 -32e3 10 vortex
+ }](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- background=1 1 1,
+\psMarble[viscosity=1000,background={[1 1 1]},
+ colors={
+ (622e07)
+ (c06d11)
+ (8f6e1d)
+ (56410d)
+ (191504)
+ },
actions={
- 9 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.08 0.30 0.51] drop
- 0 0 rad [0.18 0.76 1.00] drop
- 0 0 rad [0.93 1.00 1.00] drop
- 0 0 rad [0.08 0.30 0.51] drop
- 0 0 rad [0.80 0.75 0.82] drop
- 0 0 rad [1.00 0.99 0.65] drop
- } for
- 90 100 shift
- 0 0 -32e3 10 vortex
- }](10,10)
+ 0 0 35 colors 33 concentric-rings
+ 90 100 shift
+ 0 0 -32e3 10 vortex
+ }](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1772,17 +1827,15 @@ Animated gifs can be seen at:
\psMarble[viscosity=1000,drawcontours,
linewidth=0.1,
bckg=false,
+colors={
+ (622e07)
+ (c06d11)
+ (8f6e1d)
+ (56410d)
+ (191504)
+ },
actions={
-9 -1 1
-{
-/rad exch sqrt 50 mul def
-0 0 rad [0.08 0.30 0.51] drop
-0 0 rad [0.18 0.76 1.00] drop
-0 0 rad [0.93 1.00 1.00] drop
-0 0 rad [0.08 0.30 0.51] drop
-0 0 rad [0.80 0.75 0.82] drop
-0 0 rad [1.00 0.99 0.65] drop
-} for
+0 0 35 colors 33 concentric-rings
90 100 shift
-200 200 -32e3 10 vortex
-200 -200 32e3 10 vortex
@@ -1795,17 +1848,15 @@ actions={
\psMarble[viscosity=1000,drawcontours,
linewidth=0.1,
bckg=false,
+colors={
+ (622e07)
+ (c06d11)
+ (8f6e1d)
+ (56410d)
+ (191504)
+ },
actions={
-9 -1 1
-{
-/rad exch sqrt 50 mul def
-0 0 rad [0.08 0.30 0.51] drop
-0 0 rad [0.18 0.76 1.00] drop
-0 0 rad [0.93 1.00 1.00] drop
-0 0 rad [0.08 0.30 0.51] drop
-0 0 rad [0.80 0.75 0.82] drop
-0 0 rad [1.00 0.99 0.65] drop
-} for
+0 0 35 colors 33 concentric-rings
90 100 shift
-200 200 -32e3 10 vortex
-200 -200 32e3 10 vortex
@@ -1822,10 +1873,15 @@ actions={
This instruction simulates the action of an artist who with the tip of the stylus draws undulations on the surface of the liquid.
\begin{verbatim}
-angle {func} wiggle
+angle period ofst depth wiggle
+
+Applies sinsusoidal wiggle: y=depth*sin(360*x/period+ofst).
+
+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)
-angle Wiggle will be perpendicular to angle from y-axis up.
-{func} Function that "wiggles" the original image.
\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)$.
@@ -1839,25 +1895,18 @@ a=f(y u_x -xu_y)\Longrightarrow x'=x+au_x;\ y'=y+au_y
\textbf{Example 1:}
-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 and angular velocity $\omega=5$: $f(x,y)=50\sin(5y)$ that is coded: \texttt{\{5 mul sin 50 mul\}}, we will have:
+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$.
-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: $\omega=5\times 360/1000 = 1.8$
+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={
- 10 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 0 {1.8 mul sin 50 mul} wiggle
+ 0 0 35 colors 33 concentric-rings
+ 0 648 0 50 wiggle
}](10,10)
\end{pspicture}
\end{center}
@@ -1866,15 +1915,8 @@ linewidth=0.2,
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
actions={
- 10 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 0 {1.8 mul sin 50 mul} wiggle
+ 0 0 35 colors 33 concentric-rings
+ 0 648 0 50 wiggle
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1885,7 +1927,7 @@ linewidth=0.2,
\textbf{Example 2:}
-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)$ and is coded like that: \texttt{\{5 mul sin 50 mul\}}, thus:
+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:
$x'=x;\ y'=y+50\sin(5x)$.
\begin{center}
@@ -1893,15 +1935,8 @@ $x'=x;\ y'=y+50\sin(5x)$.
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
actions={
- 10 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 90 {1.8 mul sin 50 mul} wiggle
+ 0 0 35 colors 33 concentric-rings
+ 90 648 0 50 wiggle
}](10,10)
\end{pspicture}
\end{center}
@@ -1910,15 +1945,8 @@ linewidth=0.2,
\psMarble[drawcontours,bckg=false,
linewidth=0.2,
actions={
- 10 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 90 {1.8 mul sin 50 mul} wiggle
+ 0 0 35 colors 33 concentric-rings
+ 90 648 0 50 wiggle
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1934,15 +1962,8 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
- 10 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 45 {2.5 mul sin 50 mul} wiggle
+ 0 0 35 colors 33 concentric-rings
+ 45 648 0 50 wiggle
}](10,10)
\end{pspicture}
\end{center}
@@ -1950,15 +1971,8 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
- 10 -1 1
- {
- /rad exch sqrt 50 mul def
- 0 0 rad [0.22 0.27 0.40] drop
- 0 0 rad [0.49 0.75 0.79] drop
- 0 0 rad [0.90 0.80 0.47] drop
- 0 0 rad [0.98 0.27 0.32] drop
- } for
- 45 {2.5 mul sin 50 mul} wiggle
+ 0 0 35 colors 33 concentric-rings
+ 45 648 0 50 wiggle
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1973,34 +1987,20 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\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.040 0.236 0.424]
-},
actions={%
0 0 50 colors 25 concentric-rings
-0 {3 mul sin 30 mul} wiggle
-0 {3 mul sin -30 mul} wiggle % reverse action
+0 1080 0 30 wiggle
+0 1080 0 -30 wiggle % reverse action
}](8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\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.040 0.236 0.424]
-},
actions={%
0 0 50 colors 25 concentric-rings
-0 {3 mul sin 30 mul} wiggle
-0 {3 mul sin -30 mul} wiggle % reverse action
+0 1080 0 30 wiggle
+0 1080 0 -30 wiggle % reverse action
}](8,8)
\end{pspicture}
\end{verbatim}}
@@ -2078,11 +2078,20 @@ actions={%
\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:}
\begin{center}
\begin{pspicture*}(-4,-1)(4,12)
-\psMarble[viscosity=1000, background=0.9 0.9 0.9,
+\psMarble[viscosity=1000,
+colors={
+(36462a)
+(4f6335)
+(5d723c)
+(78965b)
+(a6a780)
+},
actions={%
0 0 45 colors 26 concentric-rings
-30 150 shift
@@ -2090,13 +2099,20 @@ actions={%
{/idx exch def
-270 idx sub -30 idx 2 mul add [-270 idx 3 mul sub] 10 -90 50 stir
} for
-90 {2 mul sin 10 mul} wiggle
-}](12,24)
+90 720 0 10 wiggle
+}](8,24)
\end{pspicture*}
\end{center}
-{\small\begin{verbatim}
+{\footnotesize\begin{verbatim}
\begin{pspicture*}(-4,-1)(4,12)
-\psMarble[viscosity=1000, background=0.9 0.9 0.9,
+\psMarble[viscosity=1000,
+colors={
+(36462a)
+(4f6335)
+(5d723c)
+(78965b)
+(a6a780)
+},
actions={%
0 0 45 colors 26 concentric-rings
-30 150 shift
@@ -2104,8 +2120,9 @@ actions={%
{/idx exch def
-270 idx sub -30 idx 2 mul add [-270 idx 3 mul sub] 10 -90 50 stir
} for
-90 {2 mul sin 10 mul} wiggle
-}](12,24)
+90 720 0 10 wiggle
+}](8,24)
+\end{pspicture*}
\end{verbatim}}
@@ -2117,7 +2134,7 @@ actions={%
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
- background=0.9 0.9 0.9,
+ background={[0.9 0.9 0.9]},
actions={
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
@@ -2146,7 +2163,7 @@ actions={%
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
- background=0.9 0.9 0.9,
+ background={[0.9 0.9 0.9]},
actions={
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
@@ -2219,12 +2236,7 @@ actions={
idx idy 55 [0.040 0.236 0.424] drop
} for
} for
-250 {
-rand 1000 mod 500 sub % -800<x<800
-rand 1000 mod 500 sub % -400<y<400
-rand 15 mod 10 add % 10<r<20
-[0.134 0.647 1] drop
-} repeat
+0 0 1500 1500 0 [0.134 0.647 1] 250 18 uniform-drops
45 [6 200 0 tines] 40 200 31 rake
100 0 [-350] 30 30 15 stir
-90 [6 200 0 tines] 40 200 31 rake
@@ -2245,12 +2257,7 @@ actions={
idx idy 55 [0.040 0.236 0.424] drop
} for
} for
-250 {
-rand 1000 mod 500 sub % -800<x<800
-rand 1000 mod 500 sub % -400<y<400
-rand 15 mod 10 add % 10<r<20
-[0.134 0.647 1] drop
-} repeat
+0 0 1500 1500 0 [0.134 0.647 1] 250 18 uniform-drops
45 [6 200 0 tines] 40 200 31 rake
100 0 [-350] 30 30 15 stir
-90 [6 200 0 tines] 40 200 31 rake
@@ -2271,16 +2278,16 @@ rand 15 mod 10 add % 10<r<20
fillstyle=gradient,framearc=0.6,linewidth=0.5\pslinewidth,
gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{pspicture}(-5,-5)(5,5)
-\psset{viscosity=500,background=1 1 1,
+\psset{viscosity=500,background={[1 1 1]},
+colors={
+[0.27 0.01 0.02]
+[0.78 0.02 0.10]
+[0.77 0.92 0.47]
+[0.11 0.18 0.07]
+[0.96 0.85 0.10]
+},
actions={
- 3 {
- /rad 100 def
- 0 0 rad [0.27 0.01 0.02] drop
- 0 0 rad [0.78 0.02 0.10] drop
- 0 0 rad [0.77 0.92 0.47] drop
- 0 0 rad [0.11 0.18 0.07] drop
- 0 0 rad [0.96 0.85 0.10] drop
- } repeat
+ 0 0 30 colors 20 concentric-rings
0 0 100 [0.78 0.02 0.10] drop
0 0 50 [0.77 0.92 0.47] drop
0 0 20 [0.11 0.18 0.00] drop
@@ -2302,16 +2309,16 @@ LensStyleGlass=YellowGlass](1,-1){%
fillstyle=gradient,framearc=0.6,linewidth=0.5\pslinewidth,
gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{pspicture}(-5,-5)(5,5)
-\psset{viscosity=500,background=1 1 1,
+\psset{viscosity=500,background={[1 1 1]},
+colors={
+[0.27 0.01 0.02]
+[0.78 0.02 0.10]
+[0.77 0.92 0.47]
+[0.11 0.18 0.07]
+[0.96 0.85 0.10]
+},
actions={
- 3 {
- /rad 100 def
- 0 0 rad [0.27 0.01 0.02] drop
- 0 0 rad [0.78 0.02 0.10] drop
- 0 0 rad [0.77 0.92 0.47] drop
- 0 0 rad [0.11 0.18 0.07] drop
- 0 0 rad [0.96 0.85 0.10] drop
- } repeat
+ 0 0 30 colors 20 concentric-rings
0 0 100 [0.78 0.02 0.10] drop
0 0 50 [0.77 0.92 0.47] drop
0 0 20 [0.11 0.18 0.00] drop
@@ -2336,7 +2343,7 @@ LensStyleGlass=YellowGlass](1,-1){%
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,background=0.64 0.70 0.79,
+\psMarble[viscosity=1000,background={[0.64 0.70 0.79]},
actions={%
11 -1 1
{
@@ -2363,7 +2370,7 @@ actions={%
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,background=0.64 0.70 0.79,
+\psMarble[viscosity=1000,background={[0.64 0.70 0.79]},
actions={%
11 -1 1
{
@@ -2396,43 +2403,43 @@ actions={%
\textbf{Example 7:}
\begin{center}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,background=0.87 0.73 0.58,
-actions= {
- -500 84 500
- {
- /idy exch def
- -500 100 600
- {
- /idx exch def
- idx idy 45 [0.298 0.370 0.247] drop
- } for
- } for
- 90 [11 200 0 tines] 40 200 31 rake
- -90 [11 200 0 tines] 40 200 31 rake
- 0 0 [-350] 30 30 15 stir
- 0 0 [-150] 60 30 15 stir
- }](10,10)
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 222 186 149 ]
+ },
+ viscosity=1000,
+ actions={
+ -300 92 500
+ {
+ 0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
+ } for
+ 90 [ 9 220 0 tines ] 40 200 31 rake
+ -90 [ 9 220 -100 tines ] 40 200 31 rake
+ 0 0 [ -350 ] 30 30 15 stir
+ 0 0 [ -150 ] 60 30 15 stir
+ }
+ ](12,12)
\end{pspicture}
\end{center}
-{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,background=0.87 0.73 0.58,
-actions= {
- -500 84 500
- {
- /idy exch def
- -500 100 600
- {
- /idx exch def
- idx idy 45 [0.298 0.370 0.247] drop
- } for
- } for
- 90 [11 200 0 tines] 40 200 31 rake
- -90 [11 200 0 tines] 40 200 31 rake
- 0 0 [-350] 30 30 15 stir
- 0 0 [-150] 60 30 15 stir
- }](10,10)
+{\footnotesize\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 222 186 149 ]
+ },
+ viscosity=1000,
+ actions={
+ -300 92 500
+ {
+ 0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
+ } for
+ 90 [ 9 220 0 tines ] 40 200 31 rake
+ -90 [ 9 220 -100 tines ] 40 200 31 rake
+ 0 0 [ -350 ] 30 30 15 stir
+ 0 0 [ -150 ] 60 30 15 stir
+ }
+ ](12,12)
\end{pspicture}
\end{verbatim}}
@@ -2444,29 +2451,21 @@ actions= {
\begin{center}
\begin{pspicture}(-7.5,-8)(7.5,8)
-\pstVerb{%
-/ripple 75 def
-/riplim ripple 6 mul def
-}%
\psMarble[
actions={
0 0 40 colors 26 concentric-rings
90 50 shift
-0 0 [ripple ripple riplim {} for] 10 180 30 stir
+0 0 [75 150 225 400 375 450] 10 180 30 stir
}](15,16)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-7.5,-8)(7.5,8)
-\pstVerb{%
-/ripple 75 def
-/riplim ripple 6 mul def
-}%
\psMarble[
actions={
0 0 40 colors 26 concentric-rings
90 50 shift
-0 0 [ripple ripple riplim {} for] 10 180 30 stir
+0 0 [75 150 225 400 375 450] 10 180 30 stir
}](15,16)
\end{pspicture}
\end{verbatim}}
@@ -2477,61 +2476,253 @@ actions={
\textbf{Example 9:}
-\begin{center}
+
+\begin{minipage}[t]{10cm}\kern0pt
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
- viscosity=1000,
- background=0.9 0.9 0.9,
-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]
-},
-actions={
+ \psMarble[
+ background={
+ [0.9 0.9 0.9]
+ },
+ 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]
+ },
+ viscosity=1000,
+ actions={
0 0 600 colors 4 get drop
- -200 -90 100 colors 5 get drop
- -200 -200 200 colors 0 get drop
- -200 200 200 colors 1 get drop
- 200 -200 200 colors 2 get drop
- 200 200 200 colors 3 get drop
- 0 0 -32e3 750 vortex
- 250 0 [ 120 80 ] 20 -100 20 stir
- 0 -500 850 -30 15 color2 5 50 arc-drops
- 0 -500 840 -30 16 color1 5 50 arc-drops
- 0 -500 850 -30 15 color5 5 50 arc-drops
- 0 0 150 0 15 10 [105 160 99] 35 20 spiral-drops
-}]
+ -200 -90 100 colors 5 get drop
+ -200 -200 200 colors 0 get drop
+ -200 200 200 colors 1 get drop
+ 200 -200 200 colors 2 get drop
+ 200 200 200 colors 3 get drop
+ 0 0 -32e3 750 vortex
+ 0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
+ 0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
+ 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
+ }
+ ]
+ \psMarble[
+ colors={
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ },
+ viscosity=1000,drawcontours,linewidth=0.2,linecolor=black,bckg=false,
+ actions={
+ 0 0 600 colors 4 get drop
+ -200 -90 100 colors 5 get drop
+ -200 -200 200 colors 0 get drop
+ -200 200 200 colors 1 get drop
+ 200 -200 200 colors 2 get drop
+ 200 200 200 colors 3 get drop
+ 0 0 -32e3 750 vortex
+ 0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
+ 0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
+ 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
+ }
+ ]
+\end{pspicture}
+\end{minipage}
+\begin{minipage}[t]{8cm}
+{\tiny\begin{verbatim}
+\begin{pspicture}(-5,-5)(5,5)
+ \psMarble[
+ background={
+ [0.9 0.9 0.9]
+ },
+ 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]
+ },
+ viscosity=1000,
+ actions={
+ 0 0 600 colors 4 get drop
+ -200 -90 100 colors 5 get drop
+ -200 -200 200 colors 0 get drop
+ -200 200 200 colors 1 get drop
+ 200 -200 200 colors 2 get drop
+ 200 200 200 colors 3 get drop
+ 0 0 -32e3 750 vortex
+ 0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
+ 0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
+ 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
+ }
+ ]
+ \psMarble[
+ colors={
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ [0 0 0]
+ },
+ viscosity=1000,drawcontours,linewidth=0.2,linecolor=black,bckg=false,
+ actions={
+ 0 0 600 colors 4 get drop
+ -200 -90 100 colors 5 get drop
+ -200 -200 200 colors 0 get drop
+ -200 200 200 colors 1 get drop
+ 200 -200 200 colors 2 get drop
+ 200 200 200 colors 3 get drop
+ 0 0 -32e3 750 vortex
+ 0 -500 850 -30 212 -5 colors 1 get 5 50 coil-drops
+ 0 -500 840 -30 215 5 colors 0 get 5 50 coil-drops
+ 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
+ }
+ ]
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+
+
+\newpage
+
+
+\textbf{Example 10:}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [0.1 0 0.1]
+ },
+ colors={
+ (e7cc9b)
+ (c28847)
+ (80410b)
+ },
+ viscosity=1000,
+ actions={
+ %% coffee mug rim and stirred foam
+ 0 0 150 [ .8 .8 .7 ] drop
+ 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 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 75 0 -450 20 30 stroke
+ %% wreath
+ 0 10 390 90 95 0 colors 1 get 14 25 coil-drops
+ 0 0 400 90 100 0 colors 0 get 14 40 coil-drops
+ 0 0 [ 400 ] 1 20 31 stir
+ %% short vine
+ -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 stroke
+ }
+ ](12,12)
+\end{pspicture}
+\end{center}
+{\tiny\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [0.1 0 0.1]
+ },
+ colors={
+ (e7cc9b)
+ (c28847)
+ (80410b)
+ },
+ viscosity=1000,
+ actions={
+ %% coffee mug rim and stirred foam
+ 0 0 150 [ .8 .8 .7 ] drop
+ 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 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 75 0 -450 20 30 stroke
+ %% wreath
+ 0 10 390 90 95 0 colors 1 get 14 25 coil-drops
+ 0 0 400 90 100 0 colors 0 get 14 40 coil-drops
+ 0 0 [ 400 ] 1 20 31 stir
+ %% short vine
+ -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 stroke
+ }
+ ](12,12)
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 11}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[background={[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]
+ },
+ actions={
+ 0 0 48 colors 25 concentric-rings
+ 90 [2 600 -150 tines] 100 750 31 rake
+ -90 [2 600 -150 tines] 100 750 31 rake
+ 0 230 shift
+ 180 [ 25 50 0 tines ] 30 200 31 rake
+ }
+ ](12,12)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
-\psMarble[
-viscosity=1000,background=0.9 0.9 0.9,
-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]
-},
-actions={
-0 0 600 colors 4 get drop
--200 -90 100 colors 5 get drop
--200 -200 200 colors 0 get drop
--200 200 200 colors 1 get drop
-200 -200 200 colors 2 get drop
-200 200 200 colors 3 get drop
-0 0 -32e3 750 vortex
-250 0 [ 120 80 ] 20 -100 20 stir
-0 -500 850 -30 15 color2 5 50 arc-drops
-0 -500 840 -30 16 color1 5 50 arc-drops
-0 -500 850 -30 15 color5 5 50 arc-drops
-0 0 150 0 15 10 [105 160 99] 35 20 spiral-drops
-}]
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[background={[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]
+ },
+ actions={
+ 0 0 48 colors 25 concentric-rings
+ 90 [2 600 -150 tines] 100 750 31 rake
+ -90 [2 600 -150 tines] 100 750 31 rake
+ 0 230 shift
+ 180 [ 25 50 0 tines ] 30 200 31 rake
+ }
+ ](12,12)
\end{pspicture}
\end{verbatim}}
@@ -2539,7 +2730,58 @@ actions={
\newpage
-\textbf{Example 10: Blendmodes}
+\textbf{Example 12}
+
+\begin{center}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 100 40 40 ]
+ },
+ colors={
+ [ 76 95 63 ]
+ [ 53 97 122 ]
+ [ 128 78 46 ]
+ },
+ actions={
+ 0 0 1100 1100 0 [ 222 186 149 ] 85 1.72 10 mul uniform-drops
+ 0 0 1100 1100 0 colors 250 1.72 16 mul uniform-drops
+ 0 0 1100 1100 0 [ 222 186 149 ] 100 1.72 7 mul uniform-drops
+ 0 0 [ -100 ] 40 300 31 stir
+ 0 0 [ -200 -275 ] 20 120 10 stir
+ 0 0 [ -325 ] 20 90 31 stir
+ }
+ ](12,12)
+\end{pspicture}
+\end{center}
+{\small\begin{verbatim}
+\begin{pspicture}(-6,-6)(6,6)
+ \psMarble[
+ background={
+ [ 100 40 40 ]
+ },
+ colors={
+ [ 76 95 63 ]
+ [ 53 97 122 ]
+ [ 128 78 46 ]
+ },
+ actions={
+ 0 0 1100 1100 0 [ 222 186 149 ] 85 1.72 10 mul uniform-drops
+ 0 0 1100 1100 0 colors 250 1.72 16 mul uniform-drops
+ 0 0 1100 1100 0 [ 222 186 149 ] 100 1.72 7 mul uniform-drops
+ 0 0 [ -100 ] 40 300 31 stir
+ 0 0 [ -200 -275 ] 20 120 10 stir
+ 0 0 [ -325 ] 20 90 31 stir
+ }
+ ](12,12)
+\end{pspicture}
+\end{verbatim}
+
+
+\newpage
+
+
+\textbf{Example 13: Blendmodes}
In case one want to overlap various marblings one can use the following blendmodes:
@@ -2547,28 +2789,28 @@ In case one want to overlap various marblings one can use the following blendmod
The blendmode is setup right after \texttt{actions=\{} like: \texttt{/Darken .setblendmode} or some other of the blendmodes.
+For Distiller users we set the equivalent: \texttt{[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark}
+
\medskip
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[viscosity=1000,
actions={
-50 [1 0 0] 10 random-drops
-20 [0 0 1] 50 random-drops
-15 [0 1 0] 100 random-drops
+%/Darken .setblendmode % ps2pdf
+[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark % Distiller
+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
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
-/Darken .setblendmode
- -500 84 500
- {
- /idy exch def
- -500 100 600
- {
- /idx exch def
- idx idy 45 [0.898 0.670 0.747] drop
- } for
- } for
+%/Darken .setblendmode % ps2pdf
+[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark % Distiller
+ -300 92 500
+ {
+ 0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
+ } for
90 [11 200 0 tines] 40 200 31 rake
-90 [11 200 0 tines] 40 200 31 rake
0 0 [-350] 30 30 15 stir
@@ -2580,22 +2822,20 @@ actions={
\begin{pspicture}(-4,-4)(4,4)
\psMarble[viscosity=1000,
actions={
-50 [1 0 0] 10 random-drops
-20 [0 0 1] 50 random-drops
-15 [0 1 0] 100 random-drops
+%/Darken .setblendmode % ps2pdf
+[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark % Distiller
+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
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
-/Darken .setblendmode
- -500 84 500
- {
- /idy exch def
- -500 100 600
- {
- /idx exch def
- idx idy 45 [0.898 0.670 0.747] drop
- } for
- } for
+%/Darken .setblendmode % ps2pdf
+[ /BM /Darken /ca 1 /CA 1 /SetTransparency pdfmark % Distiller
+ -300 92 500
+ {
+ 0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
+ } for
90 [11 200 0 tines] 40 200 31 rake
-90 [11 200 0 tines] 40 200 31 rake
0 0 [-350] 30 30 15 stir
@@ -2608,34 +2848,34 @@ actions={
\newpage
-\textbf{Example 11: Transparency}
+\textbf{Example 14: Transparency}
In case one want to overlap various marblings one can also use transparency:
The transparency is setup right after \texttt{actions=\{} like: \texttt{0.45 .setopacityalpha} or some other value between 0 and 1.
+For Distiller users we set the equivalent: \texttt{[ /ca 0.45 /CA 0.45 /SetTransparency pdfmark}
+
\medskip
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[viscosity=1000,
actions={
-50 [1 0 0] 10 random-drops
-20 [0 0 1] 50 random-drops
-15 [0 1 0] 100 random-drops
+%0.45 .setopacityalpha % ps2pdf
+[ /ca 0.35 /CA 0.35 /SetTransparency pdfmark % Distiller
+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
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
-0.45 .setopacityalpha
- -500 84 500
- {
- /idy exch def
- -500 100 600
- {
- /idx exch def
- idx idy 45 [0.898 0.670 0.747] drop
- } for
- } for
+%0.45 .setopacityalpha % ps2pdf
+[ /ca 0.35 /CA 0.35 /SetTransparency pdfmark % Distiller
+ -300 92 500
+ {
+ 0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
+ } for
90 [11 200 0 tines] 40 200 31 rake
-90 [11 200 0 tines] 40 200 31 rake
0 0 [-350] 30 30 15 stir
@@ -2647,22 +2887,20 @@ actions={
\begin{pspicture}(-4,-4)(4,4)
\psMarble[viscosity=1000,
actions={
-50 [1 0 0] 10 random-drops
-20 [0 0 1] 50 random-drops
-15 [0 1 0] 100 random-drops
+%0.45 .setopacityalpha % ps2pdf
+[ /ca 0.35 /CA 0.35 /SetTransparency pdfmark % Distiller
+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
}](8,8)
\psMarble[viscosity=1000,bckg=false,
actions={
-0.45 .setopacityalpha
- -500 84 500
- {
- /idy exch def
- -500 100 600
- {
- /idx exch def
- idx idy 45 [0.898 0.670 0.747] drop
- } for
- } for
+%0.45 .setopacityalpha % ps2pdf
+[ /ca 0.35 /CA 0.35 /SetTransparency pdfmark % Distiller
+ -300 92 500
+ {
+ 0 exch 90 [ 12 100 -100 tines ] [ 76 95 63 ] 45 line-drops
+ } for
90 [11 200 0 tines] 40 200 31 rake
-90 [11 200 0 tines] 40 200 31 rake
0 0 [-350] 30 30 15 stir
@@ -2675,6 +2913,16 @@ actions={
\newpage
+\section{Acknowledgements}
+
+Many thanks to D. P. Story who coded some additions to the \texttt{pst-marble.pro} file so it might be used for Adobe Distiller users.
+
+The file size for the documentation could so be reduced tremendously.
+
+
+\newpage
+
+
\section{List of all optional arguments for \texttt{pst-marble}}
\xkvview{family=pst-marble,columns={key,type,default}}
diff --git a/Master/texmf-dist/dvips/pst-marble/pst-marble.pro b/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
index 4353cf2db33..b48b17ce106 100644
--- a/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
+++ b/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
@@ -3,7 +3,7 @@
%%Copyright: 2018, 2019 Aubrey Jaffer
%%Creator: Aubrey Jaffer
%%For: Voluntocracy
-%%CreationDate: 2019-01-19
+%%CreationDate: 2019-01-23
/plotdict 100 dict def
plotdict begin
@@ -13,6 +13,25 @@ plotdict begin
/e^-1 1 e div def
/m4o3 -4 3.0 div def
+% dps define max, if not already defined
+systemdict /max known not {
+ /max { /arg1 exch def/arg2 exch def
+ arg1 arg2 gt {arg1}{arg2}ifelse
+ } def
+ /min { /arg1 exch def/arg2 exch def
+ arg1 arg2 lt {arg1}{arg2}ifelse
+ } def
+} if
+% dps asin definition from mst-math.pro used here
+systemdict /arcsin known not {
+ /arcsin {neg dup dup mul neg 1 add sqrt neg atan 180 sub} bind def
+} if
+
+/numeric? % x --> bool
+{
+ type dup /realtype eq exch /integertype eq or
+} bind def
+
% negative viscosity for (raster) reverse-marbling
/marble % nu (viscosity)
{
@@ -54,7 +73,7 @@ plotdict begin
{pop pop pop pop pop pop}
{
ct /wiggle eq
- {pop pop}
+ {numeric? {pop pop} if pop}
{
ct /offset eq
{pop pop}
@@ -142,13 +161,28 @@ plotdict begin
dx reverse-rendering? {neg} if add exch
} bind def
-/wiggle-deformation % px py ang {func} --> px py
+/wiggle-deformation % px py angle period ofst depth --> px py
{
- /func exch def /ang exch def
- /dy ang cos def /dx ang sin def
- /py exch def /px exch def
- /a py dx mul px dy mul sub 1000 mul func exec 1e-3 mul reverse-rendering? {neg} if def
- px dx a mul add py dy a mul add
+ dup numeric?
+ {
+ /depth exch def
+ /ofst exch def
+ /period exch def
+ /ang exch def
+ /dy ang cos def /dx ang sin def
+ /py exch def /px exch def
+ /a py dx mul px dy mul sub 1000 360 div period mul mul ofst add sin
+ depth mul 1e-3 mul reverse-rendering? {neg} if def
+ }
+ {
+ % old-style: px py ang {func} --> px py
+ /func exch def /ang exch def
+ /dy ang cos def /dx ang sin def
+ /py exch def /px exch def
+ /a py dx mul px dy mul sub 1000 mul func exec
+ 1e-3 mul reverse-rendering? {neg} if def
+ } ifelse
+ px dx a mul add py dy a mul add
} bind def
/tines % cnt spacing ofst
@@ -157,50 +191,52 @@ plotdict begin
/spacing exch def
/cnt exch def
/hint cnt 1 sub -2 div cvi def
- hint spacing mul ofst add spacing cnt hint sub spacing mul ofst add
- {} for
-} bind def
-
-/stroke-deformation % px py bx by ex ey V D --> px py
-{
- /D exch .001 mul def /V exch .001 mul abs def
- reverse-rendering? { 4 2 roll } if
- /ey exch .001 mul def /ex exch .001 mul def
- /by exch .001 mul def /bx exch .001 mul def
- /py exch def /px exch def
- /tU ex bx sub dup mul ey by sub dup mul add sqrt def
- /L V D dup mul mul nu div def
- 1e-6 tU le
- {
- /nx ex bx sub tU div def /ny ey by sub tU div def
- /rpts tU L div ceiling cvi def
- /stpx ex bx sub rpts div def /stpy ey by sub rpts div def
- /ex bx stpx add def /ey by stpy add def
- /tU tU rpts div def
- /inx 0 def /iny 0 def
- 1 1 rpts
- {
- pop
- /dxB bx px sub def /dyB by py sub def
- /dxE ex px sub def /dyE ey py sub def
- /r dxB dup mul dyB dup mul add sqrt def
- /s dxE dup mul dyE dup mul add sqrt def
- /txB dxB nx mul dyB ny mul add def
- /txE dxE nx mul dyE ny mul add def
- /ty dxB ny mul dyB nx mul sub def
- /denr e r L div exp r mul L mul 2 mul def
- /dens e s L div exp s mul L mul 2 mul def
- /inx r L mul ty dup mul sub tU mul denr div
- s L mul ty dup mul sub tU mul dens div add def
- /iny txB ty mul tU mul denr div
- txE ty mul tU mul dens div add def
- /px px inx nx mul iny ny mul add add def
- /py py inx ny mul iny nx mul sub add def
- /bx ex def /by ey def
- /ex ex stpx add def /ey ey stpy add def
- } for
- } if
- px py
+ hint
+ 1
+ cnt 1 sub hint add
+ { spacing mul ofst add } for
+} bind def
+
+/stroke-deformation % px py bx by ex ey V D --> px py
+{
+ /D exch .001 mul def /V exch .001 mul abs def
+ reverse-rendering? { 4 2 roll } if
+ /ey exch .001 mul def /ex exch .001 mul def
+ /by exch .001 mul def /bx exch .001 mul def
+ /py exch def /px exch def
+ /tU ex bx sub dup mul ey by sub dup mul add sqrt def
+ /L V D dup mul mul nu div def
+ 1e-6 tU le
+ {
+ /nx ex bx sub tU div def /ny ey by sub tU div def
+ /rpts tU L div ceiling cvi def
+ /stpx ex bx sub rpts div def /stpy ey by sub rpts div def
+ /ex bx stpx add def /ey by stpy add def
+ /tU tU rpts div def
+ /inx 0 def /iny 0 def
+ 1 1 rpts
+ {
+ pop
+ /dxB bx px sub def /dyB by py sub def
+ /dxE ex px sub def /dyE ey py sub def
+ /r dxB dup mul dyB dup mul add sqrt 1e-9 add def
+ /s dxE dup mul dyE dup mul add sqrt 1e-9 add def
+ /txB dxB nx mul dyB ny mul add def
+ /txE dxE nx mul dyE ny mul add def
+ /ty dxB ny mul dyB nx mul sub def
+ /denr e r L div exp r mul L mul 2 mul def
+ /dens e s L div exp s mul L mul 2 mul def
+ /inx r L mul ty dup mul sub tU mul denr div
+ s L mul ty dup mul sub tU mul dens div add def
+ /iny txB ty mul tU mul denr div
+ txE ty mul tU mul dens div add def
+ /px px inx nx mul iny ny mul add add def
+ /py py inx ny mul iny nx mul sub add def
+ /bx ex def /by ey def
+ /ex ex stpx add def /ey ey stpy add def
+ } for
+ } if
+ px py
} bind def
/rake-deformation % [ ang [ rs ] V tU D /rake ]
@@ -222,7 +258,7 @@ plotdict begin
px dx a mul add py dy a mul add
} bind def
-/stir-deformation % [ cx cy [ rs ] w th D /stir ]
+/stir-deformation % [ cx cy [ rs ] w th D /stir ]
{
/D exch .001 mul def /th exch def /w exch abs def
/rs exch def
@@ -232,31 +268,31 @@ plotdict begin
/a 0 def
1e-6 p-c lt
{rs {
- /r exch .001 mul def
- /L^-1 nu w pi 180 div mul r abs mul D dup mul mul div def
- /a p-c r abs sub abs L^-1 mul e^-1 exch exp th mul r 0 lt {neg} if
- a add def
- } forall
- /a a reverse-rendering? {neg} if def
+ /r exch .001 mul def
+ /L^-1 nu w pi 180 div mul r abs mul D dup mul mul div def
+ /a p-c r abs sub abs L^-1 mul e^-1 exch exp th mul r 0 lt {neg} if
+ a add def
+ } forall
+ /a a reverse-rendering? {neg} if def
} if
px cx sub py cy sub
[ a dup cos exch sin 2 copy neg exch cx cy ] transform
} bind def
% An irrotational vortex. circ is circulation; t is time in seconds
-/vortex-deformation % px py cx cy circ t --> px py
+/vortex-deformation % px py cx cy circ t --> px py
{
/t exch def /circ exch 1e-6 mul def
/cy exch .001 mul def /cx exch .001 mul def
/py exch def /px exch def
/p-c^2 px cx sub dup mul py cy sub dup mul add def
/a p-c^2 1e-6 lt
- {0}
- { nu 4 mul .75 exp
- p-c^2 2 pi mul mul t div .75 exp
- add m4o3 exp
- 180 pi div mul circ mul reverse-rendering? {neg} if }
- ifelse def
+ {0}
+ { nu 4 mul .75 exp
+ p-c^2 2 pi mul mul t div .75 exp
+ add m4o3 exp
+ 180 pi div mul circ mul reverse-rendering? {neg} if }
+ ifelse def
px cx sub py cy sub
[ a dup cos exch sin 2 copy neg exch cx cy ] transform
} bind def
@@ -264,7 +300,7 @@ plotdict begin
%% Functions used for forward rendering:
% movement due to drop.
-/spread % px py cx cy rad --> px py
+/spread % px py cx cy rad --> px py
{
/rad exch .001 mul def /cy exch .001 mul def /cx exch .001 mul def
/py exch def /px exch def
@@ -310,7 +346,7 @@ plotdict begin
} bind def
% Fills (distorted) circles.
-/do-drops % acnt = index of last action + 1
+/do-drops % acnt = index of last action + 1
{
0 1 acnt -1 add
{
@@ -320,7 +356,7 @@ plotdict begin
{
aload pop setrgbcolor pop
/Ir exch .001 mul def /Cy exch .001 mul def /Cx exch .001 mul def
- /eps 10 scl sqrt div Ir 1000. mul div acnt idx sub 1 add log div def
+ /eps 0.005 scl sqrt Ir mul acnt idx sub 1 add log mul div def
do-action
} if
} for
@@ -328,18 +364,14 @@ plotdict begin
%% Functions used for reverse-rendering:
-/Vmap1 % v1 proc
+/Vmap1 % v1 proc
{
/proc exch def
/v1 exch def
- [ v1
- {
- proc exec
- } forall
- ]
+ [ v1 {proc exec} forall ]
} bind def
-/Vmap2 % v1 v2 proc
+/Vmap2 % v1 v2 proc
{
/proc exch def
/v2 exch def
@@ -352,13 +384,13 @@ plotdict begin
res
} bind def
-/shade % v[3] pwr
+/shade % v[3] pwr
{
/pwr exch def
{dup 1e-30 lt {} {pwr exp} ifelse} Vmap1
} bind def
-/sharpen % 0<=x<=1
+/sharpen % 0<=x<=1
{
.5 sub dup abs 1e-8 lt {} {dup abs .66 exp div .63 mul} ifelse
.5 add
@@ -428,39 +460,48 @@ plotdict begin
} for
} bind def
-%% Controls and Design:
-
-% Returns number between 0. and 1.
-/random:uniform
-{
- rand 2147483647. div
-} bind def
-
-% Dimensions are relative to a 1000 x 1000 square with the origin
-% at its center.
-/color1 [0.960 0.764 0.576] bind def % deep red
-/color2 [0.316 0.362 0.298] bind def % blue
-/color3 [0.200 0.050 0.015] bind def
-/color4 [0.023 0.145 0.451] bind def
-/color5 [0.866 0.353 0.050] bind def
-/color6 [0.200 0.050 0.015] bind def
-
-% Global: viscosity
-
% [ cx cy radinc [ bgc ] [ rgb ] /drop ]
% [ cx cy [ r ] w th D /stir ]
% [ cx cy circ t /vortex ]
% [ bx by ex ey V D /stroke ]
% [ angle [ r ] V tU D /rake ]
-% [ angle {func} /wiggle ]
+% [ angle period ofst depth /wiggle ]
% [ dx dy /offset ]
-/color-norm { % rgb
+/concatstrings % (a) (b) -> (ab)
+{ exch dup length
+ 2 index length add string
+ dup dup 4 2 roll copy length
+ 4 -1 roll putinterval
+} bind def
+
+/color-norm % rgb
+{
/rgb exch def
- rgb {1 gt} forall or or { [ rgb {255 div} forall ] } { rgb } ifelse
+ rgb type /integertype eq { /rgb [ rgb ] def } if
+ rgb type /stringtype eq
+ { /rgb (16#) rgb concatstrings cvi def
+ /rgb [
+ rgb 65536 idiv 255 div
+ rgb 256 idiv 256 mod 255 div
+ rgb 256 mod 255 div
+ ] def
+ } if
+ rgb length 1 eq
+ {
+ /rgb rgb aload pop def
+ [
+ rgb 65536 idiv 255 div
+ rgb 256 idiv 256 mod 255 div
+ rgb 256 mod 255 div
+ ]
+ }
+ { rgb {1 gt} forall or or { [ rgb {255 div} forall ] } { rgb } ifelse }
+ ifelse
} bind def
-/drop { % cx cy radinc rgb
+/drop % cx cy radinc rgb
+{
/rgb exch def
/radinc exch def
/cy exch def
@@ -468,33 +509,43 @@ plotdict begin
[ cx cy radinc -1 rgb color-norm /drop ]
} bind def
-/stir { % cx cy [ r ] w th D
+/stir % cx cy [ r ] w th D
+{
/stir 7 array astore
} bind def
-/vortex { % cx cy circ t
+/vortex % cx cy circ t
+{
/vortex 5 array astore
} bind def
-/stroke { % bx by ex ey V D
+/stroke % bx by ex ey V D
+{
/stroke 7 array astore
} bind def
-/rake { % angle [ r ] V tU D
+/rake % angle [ r ] V tU D
+{
/rake 6 array astore
} bind def
-/wiggle { % angle {func}
- /wiggle 3 array astore
+/wiggle % angle period ofst depth
+{
+ dup numeric?
+ { /wiggle 5 array astore }
+ { /wiggle 3 array astore }
+ ifelse
} bind def
-/shift { % angle r
+/shift % angle r
+{
/r exch def
/th exch def
[ th sin r mul th cos r mul /offset ]
} bind def
-/concentric-rings { % xc yc thick [ color ] count
+/concentric-rings % xc yc thick [ color ] count
+{
/cnt exch def
/clra exch def
/rinc exch def
@@ -504,76 +555,168 @@ plotdict begin
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 }
+ cnt 0 le
+ { xc yc rinc clra 0 get drop }
+ { xc yc cnt 2 mul 1 add sqrt rinc mul clra cnt nclr mod get drop }
ifelse
} for
} bind def
-/arc-drops { % xc yc r ang-strt ang-step rgb cnt drad
+/coil-drops % xc yc r ang-strt arcinc rinc [ rgb ] cnt drad
+{
/drad exch def
/cnt exch def
- /rgb exch def
- /ang-step exch def
- /ang-strt exch def
+ /clra exch def
+ /rinc exch def
+ /arcinc exch def
+ /th exch def
/r exch def
/yc exch def
/xc exch def
- ang-strt ang-step ang-strt ang-step cnt 1 sub mul add
+ clra 0 get type /arraytype ne { /clra [ clra ] def } if
+ /nclr clra length def
+ /cdx 0 def
+ cnt
{
- /th exch def
- th sin r mul xc add th cos r mul yc add drad rgb drop
- } for
+ th sin r mul xc add th cos r mul yc add drad clra cdx nclr mod get drop
+ /th th arcinc r div -1 max 1 min arcsin add def
+ /r r rinc add def
+ /cdx cdx 1 add def
+ } repeat
} bind def
-/spiral-drops { % xc yc r ang-strt ang-step rinc rgb cnt drad
+/line-drops % xc yc ang [ r ] [ rgb ] drad
+{
/drad exch def
- /cnt exch def
- /rgb exch def
- /rinc exch def
- /ang-step exch def
- /ang-strt exch def
- /r exch def
+ /clra exch def
+ /rs exch def
+ /th exch def
/yc exch def
/xc exch def
- ang-strt ang-step ang-strt ang-step cnt 1 sub mul add
+ clra 0 get type /arraytype ne { /clra [ clra ] def } if
+ /nclr clra length def
+ /cdx 0 def
+ rs
{
- /th exch def
- th sin r mul xc add th cos r mul yc add drad rgb drop
- /r r rinc add def
+ /r exch def
+ th sin r mul xc add th cos r mul yc add drad clra cdx nclr mod get drop
+ /cdx cdx 1 add def
+ } forall
+} bind def
+
+% Copyright (C) 1996-1998 Geoffrey Keating.
+% This file may be freely distributed with or without modifications,
+% so long as modified versions are marked as such and copyright
+% notices are not removed.
+
+% Modified for PRNG use by Aubrey Jaffer 2019.
+
+% An implementation of an algorithm compatible with the RSA Data Security
+% Inc. RC4 stream encryption algorithm.
+
+% <string> rc4setkey <dict>
+/rc4setkey
+{
+ 6 dict begin
+ /k exch def
+ /a 256 string def
+ 0 1 255 { a exch dup put } for
+ /l k length def
+ /j 0 def
+ 0 1 255
+ {
+ /i exch def
+ /j a i get k i l mod get add j add 255 and def
+ a i a j get a j a i get put put
+ } for
+ 3 dict dup begin
+ /a a def
+ /x 0 def
+ /y 0 def
+ end
+ end
+} bind def
+
+% <rc4key> <string> rc4 <rc4key> <string>
+/rc4
+{
+ 1 index begin
+ dup dup length 1 sub 0 exch 1 exch
+ {
+ /x x 1 add 255 and def
+ /y a x get y add 255 and def
+ a x a y get a y a x get put put
+ % stack: string string index
+ 2 copy get
+ a dup x get a y get add 255 and get
+ xor put dup
} for
+ pop
+ end
+} bind def
+
+% Returns number between 0. and 1.
+/random:uniform
+{
+ /str 7 string def
+ 0 1 str length -1 add { str exch 0 put } for
+ seed str rc4 exch pop 0 exch {add 256. div} forall
} bind def
-%
-/random-drops {
-/count exch def
-/color exch def
-/size exch def
-count
+% Returns pair of normally distributed numbers.
+/random:normal2
{
- [
- random:uniform 1100 mul 550 sub
- random:uniform 1100 mul 550 sub
- e random:uniform exp size mul
- -1 color /drop
- ]
+ /rnt random:uniform 360 mul def
+ /rnr random:uniform log -2 mul e log div sqrt def
+ rnt cos rnr mul
+ rnt sin rnr mul
+} bind def
+
+/Gaussian-drops % xc yc r angle eccentricity [ rgb ] cnt drad
+{
+ /drad exch def
+ /cnt exch def
+ /clra exch def
+ /eccentricity exch sqrt def
+ /angle exch def
+ /r exch 2 sqrt div def
+ /yc exch def
+ /xc exch def
+ clra 0 get type /arraytype ne { /clra [ clra ] def } if
+ /nclr clra length def
+ /cdx 0 def
+ cnt
+ {
+ random:normal2 eccentricity div r mul exch eccentricity mul r mul
+ [ angle dup cos exch sin 2 copy neg exch xc yc ] transform
+ drad clra cdx nclr mod get drop
+ /cdx cdx 1 add def
} repeat
-} def
-
-/random-drops-colors {
-/count exch def
-/size exch def
-count
-{
- [
- random:uniform 1100 mul 550 sub
- random:uniform 1100 mul 550 sub
- e random:uniform exp size mul
- -1 colors random:uniform colors length mul floor cvi get /drop
- ]
+} bind def
+
+/uniform-drops % xc yc xsid ysid angle [ rgb ] cnt drad
+{
+ /drad exch def
+ /cnt exch def
+ /clra exch def
+ /angle exch def
+ /ysid exch def
+ /xsid exch def
+ /yc exch def
+ /xc exch def
+ clra 0 get type /arraytype ne { /clra [ clra ] def } if
+ /nclr clra length def
+ /cdx 0 def
+ cnt
+ {
+ random:uniform 0.5 sub xsid mul
+ random:uniform 0.5 sub ysid mul
+ [ angle dup cos exch sin 2 copy neg exch xc yc ] transform
+ drad clra cdx nclr mod get drop
+ /cdx cdx 1 add def
} repeat
-} def
+} bind def
+
end
% Local Variables:
% mode: PS
diff --git a/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex b/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
index 8d1245ea5a2..0eaff0e150a 100644
--- a/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
+++ b/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
@@ -6,7 +6,7 @@
%% %%
%% Package `pst-marble' %%
%% %%
-%% Aubrey Jaffers, with help of Manuel Luque, Jürgen Gilg %%
+%% Aubrey Jaffer, with help of Manuel Luque, Jürgen Gilg %%
%% Email address: agj@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.1}
-\def\filedate{2019/01/23}
+\def\fileversion{1.2}
+\def\filedate{2019/02/01}
\message{`PST' v\fileversion, \filedate}
%
\pstheader{pst-marble.pro}
@@ -35,20 +35,31 @@
\pst@addfams{pst-marble}
\define@key[psset]{pst-marble}{background}{\def\pst@marble@background{#1 }}
\define@key[psset]{pst-marble}{viscosity}{\def\pst@marble@visc{#1 }}
+\define@key[psset]{pst-marble}{seed}{\def\pst@marble@seed{#1}}
\define@key[psset]{pst-marble}{actions}{\def\pst@marble@actions{#1 }}
% colors are red, green, and blue components between 0 and 1.
\define@key[psset]{pst-marble}{colors}{\def\pst@marble@colors{#1 }}
\define@boolkey[psset]{pst-marble}[Pst@]{drawcontours}[true]{}
\define@boolkey[psset]{pst-marble}[Pst@]{bckg}[true]{}
-\psset[pst-marble]{background=0 0 0,
+\psset[pst-marble]{
+ seed={Mathematical Marbling},
+ background={
+ [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]
+ },
viscosity=1000,
actions={0 0 35 colors 35 concentric-rings},
- colors={
- [0.376 0.357 0.451]
- [0.255 0.259 0.341]
- [0.306 0.498 0.62 ]
- [0.686 0.741 0.851]
- [0.353 0.529 0.627]},
drawcontours=false,
bckg=true
}%
@@ -60,8 +71,9 @@
plotdict begin
/STROKE {\pst@number\pslinewidth 1000 div SLW systemdict /stroke get exec } def
/cm {\pst@number\psunit mul } bind def
-/background [\pst@marble@background] color-norm def
+/background \pst@marble@background color-norm def
/colors [\pst@marble@colors] def
+/seed (\pst@marble@seed) rc4setkey def
/pagewidth #1 cm def % en cm
/pageheight #2 cm def % en cm
/loy pageheight -2 div def
@@ -85,4 +97,4 @@ grestore
end}% fin du code ps
\end@SpecialObj}% % fin de la commande PSTricks
\catcode`\@=\PstAtCode\relax
-\endinput \ No newline at end of file
+\endinput
diff --git a/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty b/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
index 1d22201ee75..f6f0d367e87 100644
--- a/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
+++ b/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
@@ -1,11 +1,11 @@
\RequirePackage{pstricks}
-\ProvidesPackage{pst-marble}[2019/01/24 package wrapper for PSTricks pst-marble.tex]
+\ProvidesPackage{pst-marble}[2019/02/01 package wrapper for PSTricks pst-marble.tex]
\input pst-marble.tex
\ProvidesFile{pst-marble.tex}
[\filedate\space v\fileversion\space `PST-marble']
\IfFileExists{pst-marble.pro}{%
\ProvidesFile{pst-marble.pro}
- [2019/01/24 v. 1.1, PostScript prologue file ]
+ [2019/02/01 v. 1.2, PostScript prologue file ]
\@addtofilelist{pst-marble.pro}}{}%
\endinput