summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-26 22:57:13 +0000
committerKarl Berry <karl@freefriends.org>2019-01-26 22:57:13 +0000
commitd4802db53ea2e712cd0acfb472b73891de14e27c (patch)
tree9342e2fa1d3dabcd7f920b0a3018eb8043fecacb /Master
parent77f296fc4d17c9378658b6085929e839b4f1b9c8 (diff)
pst-marble (26jan19)
git-svn-id: svn://tug.org/texlive/trunk@49824 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/CHANGES.md70
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/README.md24
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdfbin0 -> 673946 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.pdfbin0 -> 357739 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.pdfbin0 -> 544475 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex27
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdfbin0 -> 419957 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex27
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdfbin0 -> 535630 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex18
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdfbin0 -> 1277025 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex4.tex38
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdfbin0 -> 470361 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex17
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdfbin22833647 -> 18660849 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.tex1553
-rw-r--r--Master/texmf-dist/dvips/pst-marble/pst-marble.pro155
-rw-r--r--Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex51
-rw-r--r--Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty27
21 files changed, 1300 insertions, 795 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md b/Master/texmf-dist/doc/generic/pst-marble/CHANGES.md
index b041285cf3c..3d30ca28d80 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.0 #
-# 2018/10/19 #
+# pst-marble v. 1.1 #
+# 2018/01/24 #
Source: pst-marble.tex, pst-marble.sty, pst-marble.pro
Author: Aubrey Jaffer
@@ -131,4 +131,70 @@ this system has an extra degree of freedom. If you want to reduce the
width of the affected region of a rake by a factor of 10, either
reduce **V** by a factor of 10 or reduce **D** by a factor of 3.1 (sqrt 10).
+## Changes in v. 1.1:
+## Customer friendly setup of the actions.
+
+No \[ ... \] around the actions needed anymore. And no **/** for the actions.
+
+## NEW ACTIONS
+
+## arc-drops
+
+**xc yc r ang-strt ang-step \[rgb\] cnt drad arc-drops**
+
+ 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
+
+## spiral-drops
+
+**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
+
+## concentric-bands is now obsolete
+
+To be setup now with: **concentric-rings**
+
+under more customer friendly conditions - see documentation
+
+
+## rake
+
+For the **rake** action there is the possibility to setup the rakes with
+the PostScript command *tines*
+
+## tines
+
+**cnt spacing ofst tines**
+
+ cnt Number of rakes
+ spacing displacement between the rakes
+ ofst offset of the middle rake
+ to the left (negative),
+ to the right (positive)
+
+## background
+
+The **background** option now can use the color schemes **rgb** and **RGB**
+
+With **rgb** we use decimals between 0 and 1
+
+With **RGB** we use integers between 0 and 255
+
+The colors then are automatically detected correctly.
+
+## rgb and RGB color schemes
+
+They are available for these following actions as well:
+
+ drop
+ arc-drops
+ spiral-drops
+
+and automatically detected.
diff --git a/Master/texmf-dist/doc/generic/pst-marble/README.md b/Master/texmf-dist/doc/generic/pst-marble/README.md
index bd9551024dd..ea1cd1808c3 100644
--- a/Master/texmf-dist/doc/generic/pst-marble/README.md
+++ b/Master/texmf-dist/doc/generic/pst-marble/README.md
@@ -1,11 +1,11 @@
# **README** #
-# pst-marble v. 1.0 #
-# 2018/10/19 #
+# pst-marble v. 1.1 #
+# 2019/01/24 #
Source: pst-marble.tex, pst-marble.sty, pst-marble.pro
Author: Aubrey Jaffer
Maintainers: Jürgen Gilg, Manuel Luque
- Info: Draw marble-like pattern with PSTricks
+ Info: Draw marble-like patterns with PSTricks
License: LPPL 1.3c
---
@@ -22,16 +22,18 @@ and itself) that has a continuous inverse function.
The package comes with some predefined *basic actions* like:
-- /drop
+- drop
+- arc-drops
+- spiral-drops
- random-drops
- random-drops-colors
-- concentric-bands
-- /stroke
-- /rake
-- /stir
-- /vortex
-- /wiggle
-- /offset
+- concentric-rings
+- stroke
+- rake
+- stir
+- vortex
+- wiggle
+- shift
With these commands one can create quite artistic marble-like patterns following
the rules of fluid mechanics.
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf
new file mode 100644
index 00000000000..6c77fe2ed1a
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf
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
new file mode 100644
index 00000000000..065139970b1
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.tex
@@ -0,0 +1,59 @@
+\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
new file mode 100644
index 00000000000..46de02ea5e4
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdf
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
new file mode 100644
index 00000000000..b92d26651d0
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.tex
@@ -0,0 +1,29 @@
+\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
new file mode 100644
index 00000000000..856bdfb0ea0
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..2ca19db5146
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex
@@ -0,0 +1,27 @@
+\documentclass[pstricks]{standalone}
+\usepackage{pst-marble}
+\begin{document}
+\begin{pspicture}(-5,-7)(5,7)
+\psMarble[
+ 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
+ /signe 1 def
+ 100 100 1000 {/radius exch def
+ 0 0 [radius] 10 60 signe mul 50 stir
+ /signe signe neg def
+ } for
+ 90 [ 7 200 200 tines ] 40 200 31 rake
+ -90 [ 7 200 100 tines ] 40 200 31 rake
+ 0 {2 mul sin 20 mul} wiggle
+ }](10,14)
+\end{pspicture}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf
new file mode 100644
index 00000000000..071c15e62d4
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..ad98b6f4a3e
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex
@@ -0,0 +1,27 @@
+\documentclass[pstricks]{standalone}
+\usepackage{pst-marble}
+\begin{document}
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[
+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 0 45 colors 26 concentric-rings
+0 500 -32e3 15 vortex
+500 0 -32e3 15 vortex
+-500 0 -32e3 15 vortex
+0 -500 -32e3 15 vortex
+-350 350 -32e3 15 vortex
+350 -350 -32e3 15 vortex
+350 350 -32e3 15 vortex
+-350 -350 -32e3 15 vortex
+0 0 -32e3 15 vortex
+}](10,10)
+\end{pspicture}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf
new file mode 100644
index 00000000000..dd3076a2f9f
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..f30edbfb9be
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex
@@ -0,0 +1,18 @@
+\documentclass[pstricks]{standalone}
+\usepackage{pst-marble}
+\begin{document}
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[viscosity=1000,
+ 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
+45 [11 100 0 tines] 50 100 30 rake
+-45 {5 mul sin 50 mul} wiggle
+45 {5 mul sin 50 mul} 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
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf
new file mode 100644
index 00000000000..e0e4d2fc191
--- /dev/null
+++ 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/ex4.tex b/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.tex
new file mode 100644
index 00000000000..9be69bf0e57
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.tex
@@ -0,0 +1,38 @@
+\documentclass[pstricks]{standalone}
+\usepackage{pst-marble}
+\begin{document}
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[
+actions={
+ 150{rand srand
+ /n {rrand 360 mod} def
+ n sin 350 rrand 200 mod sub mul
+ n cos 350 rrand 200 mod sub mul
+ rrand 25 mod 5 add
+ [0.98 0.89 0.56] drop
+ } repeat
+ 150{rand srand
+ /n {rrand 360 mod} def
+ n sin 350 rrand 200 mod sub mul
+ n cos 350 rrand 200 mod sub mul
+ rrand 15 mod 7 add
+ [0.357 0.525 0.13] drop
+ } repeat
+ 150{rand srand
+ /n {rrand 360 mod} def
+ n sin 350 rrand 200 mod sub mul
+ n cos 350 rrand 200 mod sub mul
+ rrand 10 mod 8 add
+ [0.2 0.05 0.015] drop
+ } repeat
+ 150{rand srand
+ /n {rrand 360 mod} def
+ n sin 350 rrand 200 mod sub mul
+ n cos 350 rrand 200 mod sub mul
+ rrand 10 mod 3 add
+ [0.07 0.41 0.255] drop
+ } repeat
+0 0 -32e3 17 vortex
+}](10,10)
+\end{pspicture}
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf
new file mode 100644
index 00000000000..1f6707935b5
--- /dev/null
+++ 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
new file mode 100644
index 00000000000..cc32df20707
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex
@@ -0,0 +1,17 @@
+\documentclass[pstricks]{standalone}
+\usepackage{pst-marble}
+\begin{document}
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[viscosity=1000,
+ 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
+45 [11 100 0 tines] 50 100 30 rake
+-45 {5 mul sin 50 mul} wiggle
+250 250 -32e3 10 vortex
+-250 -250 32e3 10 vortex
+ }](10,10)
+\end{pspicture}
+\end{document} \ No newline at end of file
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 bb132151b49..b48029536e3 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 81558b32453..de4eac0b010 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
@@ -8,7 +8,7 @@
%% %%
%% Aubrey Jaffer with the help of Jürgen Gilg and Manuel Luque %%
%% Email address: agj@alum.mit.edu %%
-%% Copyright (C) 2018 Aubrey Jaffer %%
+%% Copyright (C) 2018-2019 Aubrey Jaffer %%
%% %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
@@ -54,7 +54,7 @@
\begin{document}
-\title{pst-marble v 1.0}
+\title{pst-marble v 1.1}
\subtitle{A PSTricks package to draw marble-like patterns}
\author{%
Aubrey \textsc{Jaffer}\\
@@ -83,17 +83,16 @@ The mathematical fascination with paint marbling is that while rakings across th
\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 40 6 concentric-bands
- [ 0 0 20 background color1 /drop]
- [ 0 240 /offset]
- [ 180 [ -460 60 460 {} for ] 40 200 31 /rake]
- [ 90 {0.75 mul sin -120 mul} /wiggle]
- [ 180 [-750 -150 450] 40 200 31 /rake ]
- [ 90 {0.75 mul sin 240 mul} /wiggle ]
- [ 180 [-450 150 750] 40 200 31 /rake ]
- [ 90 {0.75 mul sin -120 mul} /wiggle ]
- }](10,10)
+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}}
\end{pspicture}
@@ -103,17 +102,16 @@ The mathematical fascination with paint marbling is that while rakings across th
\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 40 6 concentric-bands
- [ 0 0 20 background color1 /drop]
- [ 0 240 /offset]
- [ 180 [ -460 60 460 {} for ] 40 200 31 /rake]
- [ 90 {0.75 mul sin -120 mul} /wiggle]
- [ 180 [-750 -150 450] 40 200 31 /rake ]
- [ 90 {0.75 mul sin 240 mul} /wiggle ]
- [ 180 [-450 150 750] 40 200 31 /rake ]
- [ 90 {0.75 mul sin -120 mul} /wiggle ]
- }](10,10)
+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}}
\end{pspicture}
@@ -168,7 +166,7 @@ On Aubrey Jaffer's website, we'll find many links concerning the theoretical stu
\end{center}
Compared to the previous version, Aubrey Jaffer has reviewed some parameters:
-\texttt{/vortex} now models a Lamb-Oseen vortex. We'll refer to the article he wrote to study the theory:
+\texttt{vortex} now models a Lamb-Oseen vortex. We'll refer to the article he wrote to study the theory:
\begin{center}
\url{http://people.csail.mit.edu/jaffer/Marbling/vortex.pdf}
\end{center}
@@ -176,7 +174,7 @@ The documentation illustrates the parameters that are now used:
Center coordinates in mm, circulation in $\mathrm{mm^2/s}$ and time in s.
-The primitive \texttt{/line} has now become \texttt{/rake} and allows to represent the obtained image when the artist equips himself with a comb (rake) comprising a certain number of identical teeth of a given diameter. He places the comb perpendicularly to a direction fixed by the angle made with the $Oy$-axis (the angle is positive clockwise) and moves it with a speed of (\texttt{V}) along the indicated direction or contrary to it, depending on the sign of the parameter \texttt{tU}. The positions of the teeth are fixed by the distances (in mm) indicated within the list [between the brackets]---the comb/rake can also comprise only one tooth.
+The primitive \texttt{line} has now become \texttt{rake} and allows to represent the obtained image when the artist equips himself with a comb (rake) comprising a certain number of identical teeth of a given diameter. He places the comb perpendicularly to a direction fixed by the angle made with the $Oy$-axis (the angle is positive clockwise) and moves it with a speed of (\texttt{V}) along the indicated direction or contrary to it, depending on the sign of the parameter \texttt{tU}. The positions of the teeth are fixed by the distances (in mm) indicated within the list [between the brackets]---the comb/rake can also comprise only one tooth.
By default, the tank's dimensions are 1 m $\times$ 1 m. The scaling factor of the image is 0.1. All lengths are in mm, velocities (in mm/s), angles (in degrees), angular velocity (in degrees/s), and viscosity and circulation (in $\mathrm{mm^2/s}$).
@@ -186,27 +184,29 @@ Aubrey Jaffer retains 1 global parameter: the dynamic viscosity, see in particul
\begin{center}
\url{https://arxiv.org/abs/1702.02106}
\end{center}
-There are 10 types of actions defined and ready to use:
+There are 12 types of actions defined and ready to use:
\begin{verbatim}
- /drop
+ drop
+ arc-drops
+ spiral-drops
random-drops
random-drops-colors
- concentric-bands
- /rake
- /stroke
- /stir
- /vortex
- /wiggle
- /offset
+ concentric-rings
+ rake
+ stroke
+ stir
+ vortex
+ wiggle
+ shift
\end{verbatim}
They make it possible to create a very large variety of marblings with combinations of the various actions.
Initially there are drops of colors that the artist spreads with a brush on the surface (a bit of a hazard, even if they are located in a given region) and whose size depends on the brush. He performs the operation several times with other colors and also brushes of different sizes. These single drops, circular in shape, are placed with the following command
\begin{verbatim}
- cx cy r [bgc] [rgb]
- [ 0 0 100 [] [0 0 1] /drop]
+ cx cy r [rgb]
+ 0 0 100 [0 0 1] drop
\end{verbatim}
-Note, that the coordinates (\texttt{cx, cy}) of the center of the drop and its radius \texttt{r} are in points, the colors need to be setup in the rgb-color-system: (values between 0 and 1). Details are given in the following sections. So this is the first phase: arrange the drops on the surface in several stages with different radii and colors. To facilitate the experimentation of different types of actions, Aubrey Jaffer imagined an initial background obtained by dropping (one after the other) drops of different colors (we can also differentiate their radii) at the same point, they all have the same center, we then obtain an initial background consisting of concentric rings, named ``concentric-bands''.
+Note, that the coordinates (\texttt{cx, cy}) of the center of the drop and its radius \texttt{r} are in points, the colors need to be setup in the rgb-color-system: (values between 0 and 1). Details are given in the following sections. So this is the first phase: arrange the drops on the surface in several stages with different radii and colors. To facilitate the experimentation of different types of actions, Aubrey Jaffer imagined an initial background obtained by dropping (one after the other) drops of different colors (we can also differentiate their radii) at the same point, they all have the same center, we then obtain an initial background consisting of concentric rings, named ``concentric-rings''.
Aubrey Jaffer coded all the possible simulations with the expected deformations (rake, stroke, stir, wiggle, vortex) in pure PostScript and his new code, perfectly structured, and whose use is very simple, would be enough to itself, if it weren't necessary for each test, to add lines, delete others, save them within the original PostScript file \ldots
@@ -230,32 +230,32 @@ The documentation contains, of course, some more other information than within t
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:
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
-\psMarble[viscosity=120,drawcontours,linewidth=0.2,
+\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 100 [] [0 0 1] /drop]
+ 0 0 100 [0 0 1] drop
}
](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
%\hfill
\begin{pspicture}(-2,-2)(2,2)
-\psMarble[viscosity=120,drawcontours,linewidth=0.2,
+\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 200 [] [0 0 1] /drop]
- [ 0 0 150 [] [1 0 0] /drop]
+ 0 0 200 [0 0 1] drop
+ 0 0 150 [1 0 0] drop
}
](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
\end{pspicture}
%\hfill
\begin{pspicture}(-2,-2)(2,2)
-\psMarble[viscosity=120,% drawcontours,linewidth=0.1,
+\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 200 [] [0 0 1] /drop]
- [ 0 0 150 [] [1 0 0] /drop]
+ 0 0 200 [0 0 1] drop
+ 0 0 150 [1 0 0] drop
}
](4,4)
\psgrid[subgriddiv=0,gridcolor=red!30,subgridcolor=green,gridlabels=0pt,griddots=10]
@@ -263,8 +263,8 @@ The first drop of paint placed within water forms a circle with the area $a$. If
\end{center}
The command to drop a drop is written as follows:
\begin{verbatim}
- cx cy r r g b
- [ 0 0 100 [] [0 0 1] /drop]
+ cx cy r r g b
+ 0 0 100 [0 0 1] drop
\end{verbatim}
Note that the coordinates of the center of the drop and its radius are in points\footnote {There is a scaling. Example: if the largest dimension of the page is 4, 100 pts will be represented 0.4 cm} and its color is in the system rgb: (values between 0 and 1).
@@ -278,7 +278,7 @@ $P(x,y)$ is a point of the first drop and $P'(x',y')$ the transformed point.
\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 150 [] [0 0 1] /drop]
+ 0 0 150 [0 0 1] drop
}
](4,4)
\rput(0,0){\white 1}
@@ -289,8 +289,8 @@ $P(x,y)$ is a point of the first drop and $P'(x',y')$ the transformed point.
\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 150 [] [0 0 1] /drop]
- [ -250 0 150 [] [1 0 0] /drop]
+ 0 0 150 [0 0 1] drop
+ -250 0 150 [1 0 0] drop
}
](4,4)
\rput(0,0){\white 1}
@@ -304,7 +304,7 @@ If a third drop is placed, the two previous drops will then be influenced by the
\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 150 [] [0 0 1] /drop]
+ 0 0 150 [0 0 1] drop
}
](4,4)
\rput(0,0){\white 1}
@@ -314,8 +314,8 @@ If a third drop is placed, the two previous drops will then be influenced by the
\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 150 [] [0 0 1] /drop]
- [ -250 0 150 [] [1 0 0] /drop]
+ 0 0 150 [0 0 1] drop
+ -250 0 150 [1 0 0] drop
}
](4,4)
\rput(0,0){\white 1}
@@ -326,9 +326,9 @@ If a third drop is placed, the two previous drops will then be influenced by the
\psMarble[viscosity=120,
background=1 1 1,
actions={
- [ 0 0 150 [] [0 0 1] /drop]
- [ -250 0 150 [] [1 0 0] /drop]
- [ 250 0 150 [] [0 1 0] /drop]
+ 0 0 150 [0 0 1] drop
+ -250 0 150 [1 0 0] drop
+ 250 0 150 [0 1 0] drop
}
](4,4)
\rput(0,0){\white 1}
@@ -358,22 +358,22 @@ The following example illustrates that technique. Three steps with drops of diff
\psMarble[%
actions={
250 {
- [random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 30 background [0.960 0.764 0.576] /drop]
+ 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 background [0.270 0.035 0.058] /drop]
+ 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 background [0.866 0.353 0.000 ] /drop]
+ 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)
+ 300 200 -32e2 750 vortex
+ 0 -300 32e2 750 vortex }](6,8)
\end{pspicture}
\end{minipage}
\hfill
@@ -383,22 +383,22 @@ The following example illustrates that technique. Three steps with drops of diff
\psMarble[%
actions={
250 {
- [random:uniform 1000 mul 500 sub % -500 <x<500
- random:uniform 1000 mul 500 sub % -500 <y<500
- 30 background [0.960 0.764 0.576] /drop]
+ 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 background [0.270 0.035 0.058] /drop]
+ 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 background [0.866 0.353 0.000 ] /drop]
+ 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)
+ 300 200 -32e2 750 vortex
+ 0 -300 32e2 750 vortex }](6,8)
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -448,8 +448,8 @@ The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimensio
\begin{quote}
\begin{tabularx}{\linewidth}{ @{} l >{\ttfamily}l X @{} }\toprule
\textbf{Name} & \textbf{Default} & \textbf{Meaning} \\\midrule
-\Lkeyword{actions} & 0 0 40 colors length concentric-bands & The type of marbling action\\
-\Lkeyword{background} & 0 0 0 & Background color\\
+\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{bckg} & true & Boolean: to turn on/off the background color\\
\Lkeyword{colors} & \parbox{5cm}{
[0.960 0.764 0.576]
@@ -476,14 +476,15 @@ The optional argument \Largr{x , y} gives the \texttt{x} and \texttt{y} dimensio
\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 systen, for example:
+ 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 Following are introduced some basic actions, like \texttt{/drop}, \texttt{random-drops}, \texttt{random-drops-colors}, \texttt{concentric-bands}, \texttt{/rake}, \texttt{/stroke}, \texttt{/stir}, \texttt{/vortex}, \texttt{/wiggle} and \texttt{/offset}.
+\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}.
- 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.
+ 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}
@@ -528,7 +529,7 @@ The reason that we don't always reverse-render is because its resolution is limi
\section{Colors}
-All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword{colors=} which are initially setup within the \texttt{pst-marble.pro}, we can change them within the concentric circles basic figure \texttt{concentric-bands} as follows:
+All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword{colors=} which are initially setup within the \texttt{pst-marble.pro}, we can change them within the concentric circles basic figure \texttt{concentric-rings} as follows:
\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
@@ -544,21 +545,21 @@ All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword
\begin{minipage}[t]{6cm}\kern0pt
\begin{pspicture}(-3,-3)(3,3)
\psMarble[colors={
-[0.134 0.647 1.0 ]
+[0.134 0.647 1.000]
[0.977 0.855 0.549]
[0.684 0.638 0.702]
-[0.73 0.965 0.942 ]
-[0.04 0.236 0.424 ]
+[0.730 0.965 0.942]
+[0.040 0.236 0.424]
}](6,6)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-3,-3)(3,3)
\psMarble[colors={
-[0.134 0.647 1.0 ]
+[0.134 0.647 1.000]
[0.977 0.855 0.549]
[0.684 0.638 0.702]
-[0.73 0.965 0.942 ]
-[0.04 0.236 0.424 ]
+[0.730 0.965 0.942]
+[0.040 0.236 0.424]
}](6,6)
\end{pspicture}
\end{verbatim}}
@@ -566,7 +567,7 @@ All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword
\bigskip
-\textbf{Note:} As experience tells, not all colors will print as well as shown within the PDF file, so one has to print the image to see if the colors are OK for a paper. Here a list of colors that print well:
+\textbf{Hint:} As experience tells, not all colors will print as well as shown within the PDF file, so one has to print the image to see if the colors are OK for a paper. Here a list of colors that print well:
\bigskip
@@ -613,27 +614,26 @@ All colors are setup within the rgb-color-system. Besides the preset \nxLkeyword
Some of the deformation \nxLkeyword{actions=} which are initially setup within the \texttt{pst-marble.pro} can be manually changed by its parameters:
-\subsection{\texttt{/drop}}
+\subsection{\texttt{drop}}
-\texttt{/drop} defines a single drop set on the surface of a liquid.
+\texttt{drop} defines a single drop set on the surface of a liquid.
\begin{verbatim}
-[ cx cy r [ bgc ] [ rgb ] /drop ]
+cx cy r [ rgb ] drop
cx, cy Center coordinates
r Radius of the paint drop
-[bgc] Background color of paint drop
[rgb] Color of paint drop
\end{verbatim}
-This initially is a circle with its center at \texttt{(cx,cy)} and a radius \texttt{r}. The paint color is defined by the rgb-color-system. The empty slot \texttt{[]} is the background drop color.
+This initially is a circle with its center at \texttt{(cx,cy)} and a radius \texttt{r}. The paint color is defined by the rgb-color-system.
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
actions={%
-[ 0 0 50 [] [1 0 0] /drop]
-[ -200 0 70 [] [0 1 0] /drop]
-[ 200 0 100 [] [0 0 1] /drop]
+0 0 50 [1 0 0] drop
+-200 0 70 [0 1 0] drop
+200 0 100 [0 0 1] drop
}](6,6)
\end{pspicture}
\end{center}
@@ -641,19 +641,106 @@ actions={%
\begin{pspicture}(-3,-3)(3,3)
\psMarble[background=1 1 1, %white
actions={%
-[ 0 0 50 [] [1 0 0] /drop]
-[ -200 0 70 [] [0 1 0] /drop]
-[ 200 0 100 [] [0 0 1] /drop]
+0 0 50 [1 0 0] drop
+-200 0 70 [0 1 0] drop
+200 0 100 [0 0 1] drop
}](6,6)
\end{pspicture}
\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 color1 drop
+-200 0 70 color2 drop
+200 0 100 color3 drop
+\end{verbatim}
+
+
+\newpage
+
+
+\subsection{\texttt{arc-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
+
+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
+\end{verbatim}
+
+\begin{minipage}[t]{10cm}\kern0pt
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[
+ viscosity=1000,
+ background=0.9 0.9 0.9,
+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
+}]
+\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,
+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
+}]
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+
+
+\newpage
+
+
+\subsection{\texttt{spiral-drops}}
+
+\texttt{spiral-drops} defines a series of drops along a 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
\end{verbatim}
+\begin{minipage}[t]{10cm}\kern0pt
+\begin{pspicture}(-5,-5)(5,5)
+\psMarble[
+ viscosity=1000,
+ background=0.9 0.9 0.9,
+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
+}]
+\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,
+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
+}]
+\end{pspicture}
+\end{verbatim}}
+\end{minipage}
+
\newpage
@@ -667,7 +754,7 @@ The varying radii of the drops are calculated with: $r=(\text{size (in mm)})\cdo
So the radii will vary between $r_\text{min}=\text{size}$ and $r_\text{max}=2.71828182\cdot \text{size}$
\begin{verbatim}
-[ size [ color ] count random-drops ]
+size [ color ] count random-drops
count Number of the drops
size Size of the drops
@@ -682,10 +769,10 @@ color Color of the drops
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
+\psMarble[viscosity=1000,background=1 1 1,
actions={
-% size color count
- 50 [1 0 0 ] 10 random-drops
+% size color count
+ 50 [1 0 0] 10 random-drops
}](10,10)
\end{pspicture}
\end{center}
@@ -693,8 +780,8 @@ color Color of the drops
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
actions={
-% size color count
- 50 [1 0 0 ] 10 random-drops
+% size color count
+ 50 [1 0 0] 10 random-drops
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -707,12 +794,12 @@ color Color of the drops
\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
+% 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}
\end{center}
@@ -720,12 +807,12 @@ color Color of the drops
\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
+% 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}
\end{verbatim}}
@@ -747,7 +834,7 @@ The varying colors are calculated with:
\verb+[background colors random:uniform colors length mul floor cvi get /drop]+
\begin{verbatim}
-[ size count random-drops-colors ]
+size count random-drops-colors
count Number of the drops
size Size of the drops
@@ -782,57 +869,51 @@ size Size of the drops
\newpage
-\subsection{\texttt{concentric-bands}}
+\subsection{\texttt{concentric-rings}}
-With \texttt{concentric-bands}, we set the number of different colored concentric bands (\texttt{number of bands}) (at center \texttt{cx,cy}) with a \texttt{radius increment}.
+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-bands{
-% cx cy: Center coordinates
-% radius increment: Multiplication coefficient between the sets of bands
-% number of bands: Number of drops within one set = number of elements
-% within the [array of colors] list
-% [array of colors]: this is the list of colors
-% within the colors={...} key
- /nbands exch def
+/concentric-rings { % xc yc thick [ color ] count
+ /cnt exch def
+ /clra exch def
/rinc exch def
/yc exch def
/xc exch def
- 11 -1 1
- {
- /rad exch sqrt rinc mul def
- /cnt 0 def
- nbands {
- [ xc yc rad background colors cnt colors length mod get /drop]
- /cnt cnt 1 add def
- } repeat
- } for
- [ xc yc rinc 2 div background colors 0 get /drop]
-} 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:}
-
-We have 11 sets of drops, within every set, the drops have the same radii and their radii will decrease with every step. The last set is given by the argument \texttt{rinc} and all the other radii are a function of this final radius.
-
-Within the first set of drops (with same radii), the number of drops is \texttt{nbands}---every drop of it has a color taken from the colors array and its radius values \texttt{sqrt(11)*rinc}.
-
-The sets go from 11 to 1 with a step of 1, meaning that the second set has a radius of \texttt{sqrt(10)*rinc} etc.
-
-The last set has a radius of \texttt{sqrt(1)*rinc=rinc}.
-
-A last single drop is then added with the radius of \texttt{r=rinc/2}.
+%\textbf{Explanation:}
+%
+%We have 11 sets of drops, within every set, the drops have the same radii and their radii will decrease with every step. The last set is given by the argument \texttt{rinc} and all the other radii are a function of this final radius.
+%
+%Within the first set of drops (with same radii), the number of drops is \texttt{nbands}---every drop of it has a color taken from the colors array and its radius values \texttt{sqrt(11)*rinc}.
+%
+%The sets go from 11 to 1 with a step of 1, meaning that the second set has a radius of \texttt{sqrt(10)*rinc} etc.
+%
+%The last set has a radius of \texttt{sqrt(1)*rinc=rinc}.
+%
+%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}
-[ cx cy RadInc NbrBands concentric-bands ]
+xc yc thick [ color ] count concentric-rings
cx, cy Center coordinates
-RadInc Multiplication coefficient between the bands
-NbrBands Number of the elements within
+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
@@ -844,7 +925,7 @@ NbrBands Number of the elements within
\textbf{Example 1:}
-\texttt{concentric-bands} is the default action of the \texttt{actions=\{...\}} key, meaning if \textbf{no} action is chosen, \texttt{concentric-bands} 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 radius increment and its default color list is in effect.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble(10,10)
@@ -862,7 +943,7 @@ NbrBands Number of the elements within
\textbf{Example 2:}
-If we want to change \texttt{RadInc} and \texttt{NbrBands}, we do the following:
+If we want to change \texttt{thick} and \texttt{count}, we do the following:
\medskip
@@ -870,8 +951,8 @@ If we want to change \texttt{RadInc} and \texttt{NbrBands}, we do the following:
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
-% cx cy RadInc NbrBands
- 0 0 25 6 concentric-bands
+% cx cy thick color count
+ 0 0 25 colors 40 concentric-rings
}](10,10)
\end{pspicture}
\end{center}
@@ -879,17 +960,18 @@ If we want to change \texttt{RadInc} and \texttt{NbrBands}, we do the following:
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
actions={
-% cx cy RadInc NbrBands
- 0 0 25 6 concentric-bands
+% cx cy thick color count
+ 0 0 25 colors 40 concentric-rings
}](10,10)
\end{pspicture}
\end{verbatim}}
\medskip
-\textbf{Note:} If one increases \texttt{RadInc} to large values $>100$ the area of the annuli increases by square, so not all annuli will be shown within the image, however they are calculated, which leads to longer compilation times and increases the final file size.
+\textbf{Note:} If one increases \texttt{thick} to large values $>100$ the area of the bands will increases by square, so not all bands will be shown within the image, however they are calculated, which leads to longer compilation times and increases the final file size.
+
+Typical values are: $35<\text{\texttt{thick}}<50$
-Typical values are: $35<\text{\texttt{RadInc}}<50$
\newpage
@@ -903,16 +985,15 @@ If we like to change the colors as well, we do this with the \texttt{colors=\{..
\psMarble[
background=0.9 0.9 0.9,
colors={
- [0.08 0.3 0.51 ]
+ [0.08 0.3 0.51]
[0.18 0.76 1]
[0.93 1 1]
- [0.08 0.3 0.51 ]
+ [0.08 0.3 0.51]
[0.8 0.75 0.82]
[1 0.99 0.65]
},
actions={
-% cx cy RadInc NbrBands
- 0 0 25 6 concentric-bands
+ 0 0 35 colors 26 concentric-rings
}](10,10)
\end{pspicture}
\end{center}
@@ -921,27 +1002,24 @@ If we like to change the colors as well, we do this with the \texttt{colors=\{..
\psMarble[
background=0.9 0.9 0.9,
colors={
- [0.08 0.3 0.51 ]
+ [0.08 0.3 0.51]
[0.18 0.76 1]
[0.93 1 1]
- [0.08 0.3 0.51 ]
+ [0.08 0.3 0.51]
[0.8 0.75 0.82]
[1 0.99 0.65]
},
actions={
-% cx cy RadInc NbrBands
- 0 0 25 6 concentric-bands
+ 0 0 35 colors 26 concentric-rings
}](10,10)
\end{pspicture}
\end{verbatim}}
-\textbf{Note:} If the parameter \texttt{NbrBands} is i. e. set to 6, this means that there are six different colors within the bands in order (mod 6), so 6 colors should be setup within the \texttt{colors=\{...\}} key. If no colors are individually chosen by the \texttt{colors=\{...\}} key, the 6 predefined colors are used by default.
-
\newpage
-\subsection{\texttt{/rake}}
+\subsection{\texttt{rake}}
This is to represent the image obtained when the artist is equipped with a comb (rake) containing a number of identical teeth of a given diameter. He places the comb perpendicularly to the direction fixed by the angle made with the axis $Oy$ (the angle is counted: if taken positive values---clockwise, if taken negative values---counterclockwise) and moves it with a speed of \texttt{V} in the indicated direction or contrary to it, following the sign of the parameter \texttt{tU}. The positions of the teeth are set up by the distances (in mm) indicated [ between brackets ], the comb can also have only one tooth.
@@ -972,7 +1050,7 @@ For the following examples \texttt{viscosity=1000} is set. This is a typical val
\textbf{Explanations for the key \texttt{tU}:}
-Setting: \verb![ 45 [ 200 ] 20 -100 50 /rake]!
+Setting: \verb! 45 [ 200 ] 20 -100 50 rake!
The orange circles are the ones without deformation. The black ones are the ones after deformation.
\begin{itemize}
@@ -981,27 +1059,26 @@ The orange circles are the ones without deformation. The black ones are the ones
\end{itemize}
\begin{center}
\begin{pspicture*}(-5,-5)(5,5)
-\psgrid[subgriddiv=1,gridcolor=lightgray!10]
\psMarble[viscosity=1000,
linewidth=0.1,
drawcontours,
bckg=false,
actions={9 -2 2
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0 0 0] /drop]
+ /rad exch sqrt 50 mul def
+ 0 0 rad [0 0 0] drop
} for
% angle r V tU D
-[ 45 [ 200 ] 20 -100 50 /rake]
+ 45 [ 200 ] 20 -100 50 rake
}]%
\psMarble[viscosity=1000,
+bckg=false,
linewidth=0.1,
drawcontours,
-bckg=false,
actions={9 -2 2
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [1 0.5 0] /drop]
+ /rad exch sqrt 50 mul def
+ 0 0 rad [1 0.5 0] drop
} for
}]%
\psline[linecolor=red](-5,-5)(5,5)
@@ -1022,6 +1099,7 @@ actions={9 -2 2
\psdot[linecolor=blue,linewidth=0.2pt](-0.3,-3.1)
\uput[0](-0.3,-3.1){\textcolor{blue}{S}}
\psline[linecolor=blue,linewidth=1.5pt]{->}(0.4,-2.42)(-0.3,-3.1)
+\psgrid[subgriddiv=1]
\end{pspicture*}
\end{center}
\begin{itemize}
@@ -1039,7 +1117,7 @@ $\text{\texttt{tU}}=|\overrightarrow{RS}|=1\,\text{cm}$ with respect to the scal
\newpage
-\textbf{Example 1:} \verb+[ 45 [ 200 ] 20 -100 50 /rake]+
+\textbf{Example 1:} \verb+ 45 [ 200 ] 20 -100 50 rake+
The angle is \texttt{angle=45}, means the direction of the stylus track north-east. (If the angle would be chosen to \texttt{angle=-45}, the stylus track would move north-west.
@@ -1056,14 +1134,15 @@ The stylus parameter \texttt{D} (given in mm) is the ratio of its submerged volu
\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 background [0 0 0] /drop]
+ /rad exch sqrt 50 mul def
+ 0 0 rad [0 0 0] drop
} for
-% angle r V tU D
-[ 45 [ 200 ] 20 -100 50 /rake]
+% angle r V tU D
+ 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)}
@@ -1078,14 +1157,14 @@ actions={30 -2 2
\end{center}
{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
-\psMarble[viscosity=1000,linewidth=0.1,drawcontours,
+\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
actions={30 -2 2
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0 0 0] /drop]
+ /rad exch sqrt 50 mul def
+ 0 0 rad [0 0 0] drop
} for
-% angle r V tU D
-[ 45 [ 200 ] 20 -100 50 /rake]
+% angle r V tU D
+ 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)}
@@ -1103,7 +1182,7 @@ actions={30 -2 2
\newpage
-\textbf{Example 2:} \verb+[ 45 [ 200 ] 20 100 50 /rake]+
+\textbf{Example 2:} \verb+ 45 [ 200 ] 20 100 50 rake+
The angle is \texttt{angle=45}, means the direction of the stylus track is north-east.
@@ -1118,14 +1197,14 @@ The stylus parameter \texttt{D} (given in mm) is set to 50 mm.
\begin{center}
\psscalebox{0.8}{%
\begin{pspicture*}(-5,-5)(5,5)
-\psMarble[viscosity=1000,linewidth=0.1,drawcontours,
+\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
actions={30 -2 2
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0 0 0] /drop]
+ /rad exch sqrt 50 mul def
+ 0 0 rad [0 0 0] drop
} for
% 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)}
@@ -1140,14 +1219,14 @@ actions={30 -2 2
\end{center}
{\small\begin{verbatim}
\begin{pspicture*}(-5,-5)(5,5)
-\psMarble[viscosity=1000,linewidth=0.1,drawcontours,
+\psMarble[viscosity=1000,linewidth=0.1,bckg=false,drawcontours,
actions={30 -2 2
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0 0 0] /drop]
+ /rad exch sqrt 50 mul def
+ 0 0 rad [0 0 0] drop
} for
-% angle r V tU D
-[ 45 [ 200 ] 20 100 50 /rake]
+% angle r V tU D
+ 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)}
@@ -1165,11 +1244,21 @@ actions={30 -2 2
\newpage
-\textbf{Example 3:} \verb+[ 0 [-500 100 500 {} for] 50 100 30 /rake]+
+\textbf{Example 3:} \verb+ 0 [11 100 0 tines] 50 100 30 rake+
+
+\begin{verbatim}
+cnt spacing ofst tines
+
+cnt Number of theeth
+spacing Displacement between the teeth
+ofst Offset of the middle tooth
+ to the left (negative),
+ to the right (positive)
+\end{verbatim}
The angle is \texttt{angle=0}, means the direction of the stylus track is north.
-The distance \texttt{[r]} is a list of 11 teeth: \texttt{[-500 100 500 {} for]} meaning the distances of the teeth are: \texttt{-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500}. Starting at \texttt{-500} in steps of \texttt{100} up to \texttt{500}. (5 to the left of the indicated direction (the ones with negative values) and 5 to the right of the indicated direction (the ones with the positive values) and one tooth within the center.
+The distance \texttt{[r]} is a list of 11 teeth: \texttt{[11 100 0 tines]} meaning the distances of the teeth are: \texttt{-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500}. Starting at \texttt{0} to the left and right in steps of \texttt{100} up to \texttt{11} teeth with offset \texttt{0} (the center). (5 to the left of the indicated direction (the ones with negative values) and 5 to the right of the indicated direction (the ones with the positive values) and one tooth within the center. If the offset is set to a negative value, the center tooth moves to the left if taken positive it moves the center tooth to the right.
The stylus velocity is given with \texttt{V=50} (in mm/s).
@@ -1182,12 +1271,18 @@ The stylus parameter \texttt{D} (given in mm) is set to 30 mm.
\begin{pspicture}(-4,-5)(4,5)
\psset{viscosity=1000}%
\psMarble[
+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={%
-% cx cy radinc count
- 0 0 35 6 concentric-bands
-% angle r V tU D
-% rake with 11 teeth aligned 1 cm (= 100 pts)
-[ 0 [-500 100 500 {} for] 50 100 30 /rake]
+ 0 0 35 colors 32 concentric-rings
+% rake with 11 teeth aligned 1 cm (= 100 pts) with no offset
+0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\psMarble[
linewidth=0.05,
@@ -1195,11 +1290,9 @@ colors={[1 1 1]},
bckg=false,
drawcontours,
actions={%
-% cx cy radinc count
- 0 0 35 6 concentric-bands
-% angle r V tU D
-% rake with 11 teeth aligned 1 cm (= 100 pts)
-[ 0 [-500 100 500 {} for] 50 100 30 /rake]
+0 0 35 colors 32 concentric-rings
+%% rake with 11 teeth aligned 1 cm (= 100 pts)
+0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\end{pspicture}
\end{center}
@@ -1210,12 +1303,18 @@ actions={%
\begin{pspicture}(-4,-5)(4,5)
\psset{viscosity=1000}%
\psMarble[
+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={%
-% cx cy radinc count
- 0 0 35 6 concentric-bands
-% angle r V tU D
-% rake with 11 teeth aligned 1 cm (= 100 pts)
-[ 0 [-500 100 500 {} for] 50 100 30 /rake]
+ 0 0 35 colors 32 concentric-rings
+% rake with 11 teeth aligned 1 cm (= 100 pts) with no offset
+0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\psMarble[
linewidth=0.05,
@@ -1223,11 +1322,9 @@ colors={[1 1 1]},
bckg=false,
drawcontours,
actions={%
-% cx cy radinc count
- 0 0 35 6 concentric-bands
-% angle r V tU D
-% rake with 11 teeth aligned 1 cm (= 100 pts)
-[ 0 [-500 100 500 {} for] 50 100 30 /rake]
+0 0 35 colors 32 concentric-rings
+%% rake with 11 teeth aligned 1 cm (= 100 pts)
+0 [11 100 0 tines] 50 100 30 rake
}](8,10)%
\end{pspicture}
\end{verbatim}}
@@ -1241,7 +1338,7 @@ actions={%
\newpage
-\subsection{\texttt{/stroke}}
+\subsection{\texttt{stroke}}
The documentation is on the web page:
\begin{center}
@@ -1249,7 +1346,7 @@ The documentation is on the web page:
\end{center}
Parameters for \texttt{/stroke-deformation}: \texttt{bx, by, ex, ey, V, D}
\begin{verbatim}
-[ bx by ex ey V D /stroke ]
+bx by ex ey V D stroke
bx, by Beginning of stroke
ex, ey End of stroke
@@ -1263,9 +1360,9 @@ D Stylus diameter in mm. Make larger to affect paint farther away.
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={%
-0 0 35 6 concentric-bands
+0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
-[ 30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 50 10 /stroke ]
+30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 50 10 stroke
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
@@ -1279,9 +1376,9 @@ actions={%
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={%
-0 0 35 6 concentric-bands
+0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
-[ 30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 50 10 /stroke ]
+30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 50 10 stroke
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
@@ -1302,10 +1399,9 @@ actions={%
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={%
-% cx cy radinc count
- 0 0 35 6 concentric-bands
+ 0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
-[ 30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 200 30 /stroke ]
+30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 200 30 stroke
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
@@ -1322,10 +1418,9 @@ actions={%
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=250,
actions={%
-% cx cy radinc count
- 0 0 35 6 concentric-bands
+ 0 0 35 colors 32 concentric-rings
% X1 begin Y1 begin X2 end Y2 end V D
-[ 30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 200 30 /stroke ]
+30 sin 400 mul 30 cos 400 mul 30 sin 100 mul 30 cos 100 mul 200 30 stroke
}](10,10)
\psset{linecolor=red,linewidth=0.1}
\pstVerb{/scaleFactor 10 1000 div def
@@ -1343,11 +1438,11 @@ actions={%
\newpage
-\subsection{\texttt{/stir}}
+\subsection{\texttt{stir}}
Consider a single stylus (a cylinder of diameter \texttt{D}) that is placed on the $Oy$-axis at a distance $r$ from the chosen center. In a circular motion, the artist rotates the stylus by an angle $\theta$. The angular velocity will influence the shape of the deformation. The direction of rotation is fixed by the sign of $\theta$. If $\theta>0$ the artist rotates counterclockwise \footnote{The sign of $r$ can also indicate the direction of rotation. If $r<0$ the direction of the rotation fixed by $\theta$ inverts.}.
\begin{verbatim}
-[ cx cy [ r ] w th D /stir ]
+cx cy [ r ] w th D stir
cx, cy Center coordinates in mm.
[ r ] List of radii in mm.
@@ -1360,7 +1455,7 @@ D Tine diameter in mm.
\textbf{Explanations for the key \texttt{th}:}
-Setting: \verb![ 0 0 [ 350 ] 10 70 10 /stir ]!
+Setting: \verb! 0 0 [ 350 ] 10 70 10 stir !
\textbf{All} points on the circle are rotated by \texttt{th=70}. There is \textbf{no} partial stir operation.
\begin{center}
@@ -1370,18 +1465,18 @@ Setting: \verb![ 0 0 [ 350 ] 10 70 10 /stir ]!
\pscircle[linestyle=dashed]{3.5}
\psMarble[viscosity=20,bckg=false,
actions={
- [ 350 0 15 background [0.22 0.27 0.4] /drop]
- [ 350 20 cos mul 350 20 sin mul 15 background [0.49 0.75 0.79] /drop]
- [ 350 40 cos mul 350 40 sin mul 15 background [0.9 0.8 0.47] /drop]
- [ 350 60 cos mul 350 60 sin mul 15 background [0.98 0.27 0.317]/drop]
+ 350 0 15 [0.22 0.27 0.4] drop
+ 350 20 cos mul 350 20 sin mul 15 [0.49 0.75 0.79] drop
+ 350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop
+ 350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop
}]
\psMarble[viscosity=20,bckg=false,
actions={
- [ 350 0 15 background [0.22 0.27 0.4] /drop]
- [ 350 20 cos mul 350 20 sin mul 15 background [0.49 0.75 0.79] /drop]
- [ 350 40 cos mul 350 40 sin mul 15 background [0.9 0.8 0.47] /drop]
- [ 350 60 cos mul 350 60 sin mul 15 background [0.98 0.27 0.317]/drop]
- [ 0 0 [ 350 ] 10 70 10 /stir ]
+ 350 0 15 [0.22 0.27 0.4] drop
+ 350 20 cos mul 350 20 sin mul 15 [0.49 0.75 0.79] drop
+ 350 40 cos mul 350 40 sin mul 15 [0.9 0.8 0.47] drop
+ 350 60 cos mul 350 60 sin mul 15 [0.98 0.27 0.317] drop
+ 0 0 [ 350 ] 10 70 10 stir
}]
\psarc[arrowinset=0]{->}(0,0){3.9}{0}{70}
\psline[linecolor=blue](0;0)(3.5;0)
@@ -1402,13 +1497,13 @@ Setting: \verb![ 0 0 [ 350 ] 10 70 10 /stir ]!
actions={
9 -1 3
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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 -100 [ 200 ] 10 60 30 /stir ]
+ 0 -100 [200] 10 60 30 stir
}](10,10)
\psdot[dotstyle=+,linecolor=white,linewidth=2pt](0,-1)
\pscircle[linestyle=dashed,linecolor=white](0,-1){2}
@@ -1424,13 +1519,13 @@ Setting: \verb![ 0 0 [ 350 ] 10 70 10 /stir ]!
actions={
9 -1 3
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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 -100 [ 200 ] 10 60 30 /stir ]
+ 0 -100 [200] 10 60 30 stir
}](10,10)
\psdot[dotstyle=+,linecolor=white,linewidth=2pt](0,-1)
\pscircle[linestyle=dashed,linecolor=white](0,-1){2}
@@ -1455,13 +1550,13 @@ If the artist repeats the same gesture several times, a whirlwind effect is crea
actions={
9 -1 3
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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
+ 5{0 -100 [200] 10 60 30 stir} repeat
}](10,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
@@ -1472,13 +1567,13 @@ If the artist repeats the same gesture several times, a whirlwind effect is crea
actions={
9 -1 3
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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
+ 5{0 -100 [200] 10 60 30 stir} repeat
}](10,10)
\psgrid[subgriddiv=1,griddots=10,gridlabels=0pt]
\end{pspicture}
@@ -1500,31 +1595,31 @@ The artist turns from two different centers, changing the direction of rotation.
actions={
9 -1 3
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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 200 [200] 10 60 30 stir
+ 0 -200 [200] -10 60 30 stir
}](8,10)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
-actions={
-9 -1 3
-{
-/rad exch sqrt 50 mul def
-[ 0 0 rad background [0.22 0.27 0.4] /drop]
-[ 0 0 rad background [0.49 0.75 0.79] /drop]
-[ 0 0 rad background [0.9 0.8 0.47] /drop]
-[ 0 0 rad background [0.98 0.27 0.317]/drop]
-} for
-[ 0 200 [ 200 ] 10 60 30 /stir ]
-[ 0 -200 [ 200 ] -10 60 30 /stir ]
-}](8,10)
+ 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
+ }](8,10)
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -1535,31 +1630,31 @@ actions={
actions={
9 -1 3
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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 -200 [200] -10 60 30 stir
+ 0 200 [200] 10 60 30 stir
}](8,10)
\end{pspicture}
{\small\begin{verbatim}
\begin{pspicture}(-4,-5)(4,5)
\psMarble[
-actions={
-9 -1 3
-{
-/rad exch sqrt 50 mul def
-[ 0 0 rad background [0.22 0.27 0.4] /drop]
-[ 0 0 rad background [0.49 0.75 0.79] /drop]
-[ 0 0 rad background [0.9 0.8 0.47] /drop]
-[ 0 0 rad background [0.98 0.27 0.317]/drop]
-} for
-[ 0 -200 [ 200 ] -10 60 30 /stir ]
-[ 0 200 [ 200 ] 10 60 30 /stir ]
-}](8,10)
+ 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
+ }](8,10)
\end{pspicture}
\end{verbatim}}
\end{minipage}
@@ -1569,10 +1664,10 @@ actions={
\newpage
-\subsection{\texttt{/vortex}}
+\subsection{\texttt{vortex}}
\begin{verbatim}
-[ cx cy circ t /vortex ]
+cx cy circ t vortex
cx, cy Center coordinates in mm.
circ Circulation (in mm^2/s) is a simple scale factor.
@@ -1604,11 +1699,11 @@ After a long enough time, the whole surface returns to its initial state. This c
\multiframe{20}{rA=-3+0.65}{%
\psMarble[
actions={%
- 0 0 40 6 concentric-bands
- [ 0 0 20 background color1 /drop]
- [ 90 [ -400 400 600 {} for ] 40 200 31 /rake]
- [-90 [ -600 400 600 {} for ] 40 200 31 /rake]
- [0 0 -25200 5 \rA\space exp /vortex]
+ 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
+ 0 0 -25200 5 \rA\space exp vortex
}](10,10)
}
\end{animateinline}
@@ -1629,19 +1724,19 @@ Animated gifs can be seen at:
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
background=1 1 1,
- actions= {
+ actions={
9 -1 1
{
/rad exch sqrt 50 mul def
- [ 0 0 rad background [0.08 0.3 0.51 ] /drop]
- [ 0 0 rad background [0.18 0.76 1] /drop]
- [ 0 0 rad background [0.93 1 1] /drop]
- [ 0 0 rad background [0.08 0.3 0.51 ] /drop]
- [ 0 0 rad background [0.8 0.75 0.82] /drop]
- [ 0 0 rad background [1 0.99 0.65] /drop]
+ 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 100 /offset]
- [ 0 0 -32e3 10 /vortex ]
+ 90 100 shift
+ 0 0 -32e3 10 vortex
}](10,10)
\end{pspicture}
\end{center}
@@ -1649,19 +1744,19 @@ Animated gifs can be seen at:
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,
background=1 1 1,
- actions= {
+ actions={
9 -1 1
{
/rad exch sqrt 50 mul def
- [ 0 0 rad background [0.08 0.3 0.51 ] /drop]
- [ 0 0 rad background [0.18 0.76 1] /drop]
- [ 0 0 rad background [0.93 1 1] /drop]
- [ 0 0 rad background [0.08 0.3 0.51 ] /drop]
- [ 0 0 rad background [0.8 0.75 0.82] /drop]
- [ 0 0 rad background [1 0.99 0.65] /drop]
+ 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 100 /offset]
- [ 0 0 -32e3 10 /vortex ]
+ 90 100 shift
+ 0 0 -32e3 10 vortex
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1676,44 +1771,46 @@ Animated gifs can be seen at:
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,drawcontours,
linewidth=0.1,
-background=1 1 1,
-actions= {
+bckg=false,
+actions={
9 -1 1
{
/rad exch sqrt 50 mul def
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
+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 100 /offset]
-[ 0 0 -32e3 10 /vortex ]
+90 100 shift
+-200 200 -32e3 10 vortex
+-200 -200 32e3 10 vortex
}](10,10)
-\psdot[dotstyle=+,dotsize=0.25,linecolor=red](0,0)
+\psdot[dotstyle=+,dotsize=0.25,linecolor=red](-2,-2)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=1000,drawcontours,
linewidth=0.1,
-background=1 1 1,
-actions= {
+bckg=false,
+actions={
9 -1 1
{
/rad exch sqrt 50 mul def
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
-[ 0 0 rad background [0 0 0 ] /drop]
+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 100 /offset]
-[ 0 0 -32e3 10 /vortex ]
+90 100 shift
+-200 200 -32e3 10 vortex
+-200 -200 32e3 10 vortex
}](10,10)
-\psdot[dotstyle=+,dotsize=0.25,linecolor=red](0,0)
+\psdot[dotstyle=+,dotsize=0.25,linecolor=red](-2,-2)
\end{pspicture}
\end{verbatim}}
@@ -1721,11 +1818,11 @@ actions= {
\newpage
-\subsection{\texttt{/wiggle}}
+\subsection{\texttt{wiggle}}
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 {func} wiggle
angle Wiggle will be perpendicular to angle from y-axis up.
{func} Function that "wiggles" the original image.
@@ -1749,35 +1846,37 @@ $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$
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,linewidth=0.2,
+\psMarble[drawcontours,bckg=false,
+linewidth=0.2,
actions={
10 -1 1
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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 {1.8 mul sin 50 mul} wiggle
}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,linewidth=0.2,
+\psMarble[drawcontours,bckg=false,
+linewidth=0.2,
actions={
10 -1 1
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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 {1.8 mul sin 50 mul} wiggle
}](10,10)
- \end{pspicture}
+\end{pspicture}
\end{verbatim}}
@@ -1791,33 +1890,35 @@ For a sinusoidal undulation parallel to the axis $Ox$, we set $\alpha=90$. In th
$x'=x;\ y'=y+50\sin(5x)$.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,linewidth=0.2,
+\psMarble[drawcontours,bckg=false,
+linewidth=0.2,
actions={
10 -1 1
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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]
+ 90 {1.8 mul sin 50 mul} wiggle
}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[drawcontours,linewidth=0.2,
+\psMarble[drawcontours,bckg=false,
+linewidth=0.2,
actions={
10 -1 1
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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]
+ 90 {1.8 mul sin 50 mul} wiggle
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1835,14 +1936,13 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
actions={
10 -1 1
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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]
-% [ -45 {2.5 mul sin 50 mul} /wiggle]
+ 45 {2.5 mul sin 50 mul} wiggle
}](10,10)
\end{pspicture}
\end{center}
@@ -1852,14 +1952,13 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
actions={
10 -1 1
{
- /rad exch sqrt 50 mul def
- [ 0 0 rad background [0.22 0.27 0.4] /drop]
- [ 0 0 rad background [0.49 0.75 0.79] /drop]
- [ 0 0 rad background [0.9 0.8 0.47] /drop]
- [ 0 0 rad background [0.98 0.27 0.317]/drop]
+ /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]
-% [ -45 {2.5 mul sin 50 mul} /wiggle]
+ 45 {2.5 mul sin 50 mul} wiggle
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -1874,35 +1973,35 @@ 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.0 ]
- [0.977 0.855 0.549]
- [0.684 0.638 0.702]
- [0.73 0.965 0.942 ]
- [0.04 0.236 0.424 ]
- },
- actions={%
- 0 0 50 5 concentric-bands
- [0 {3 mul sin 30 mul } /wiggle ]
- [0 {3 mul sin -30 mul } /wiggle ] % reverse action
- }](8,8)
+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
+}](8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-4,-4)(4,4)
\psMarble[
- colors={
- [0.134 0.647 1.0 ]
- [0.977 0.855 0.549]
- [0.684 0.638 0.702]
- [0.73 0.965 0.942 ]
- [0.04 0.236 0.424 ]
- },
- actions={%
- 0 0 50 5 concentric-bands
- [0 {3 mul sin 30 mul } /wiggle ]
- [0 {3 mul sin -30 mul } /wiggle ] % reverse action
- }](8,8)
+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
+}](8,8)
\end{pspicture}
\end{verbatim}}
@@ -1910,48 +2009,66 @@ For a sinusoidal undulation in direction of the line $y=x$, we set $\alpha=45^\m
\newpage
-\subsection{\texttt{/offset}}
+\subsection{\texttt{shift}}
\begin{verbatim}
-[ dx dy /offset ]
+angle rad shift
-dx Displacement of the image in x direction
-dy Displacement of the image in y direction
+angle Angle
+rad Length of displacement vector
\end{verbatim}
-The choice of units was made, so that 100 pts correspond to 1 cm within the image. \texttt{dx}, \texttt{dy} is the translation vector with which the image is shifted.
+The choice of units was made, so that 100 pts correspond to 1 cm within the image. \texttt{rad} is the length shifted.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=50,
- actions={%
- 0 0 35 6 concentric-bands
-% dx dy
- [100 100 /offset]}]
-\pstVerb{/scaleFactor 10 1000 div def
- /xS1 100 scaleFactor mul def
- /yS1 100 scaleFactor mul def
- }%
+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 43 colors 32 concentric-rings
+45 200 shift}]
+\pstVerb{%
+/scaleFactor 10 1000 div def
+/xS1 45 cos 200 mul scaleFactor mul def
+/yS1 45 sin 200 mul scaleFactor mul def
+}%
\rput(!xS1 yS1){\psline(0.5,0)(-0.5,0)\psline(0,0.5)(0,-0.5)}
\psline[linestyle=dashed](-5,0)(5,0)
\psline[linestyle=dashed](0,-5)(0,5)
-\psline[linecolor=red]{->}(0,0)(1,1)
+\psline[linecolor=red]{->}(0,0)(2;45)
+\psarc[linecolor=red](0,0){1}{0}{45}
+\uput{0.36}[22.5](0,0){\color{red}$\alpha$}
\end{pspicture}
\end{center}
-The displacement vector is given by \texttt{dx} and \texttt{dy} in pts.
-{\small\begin{verbatim}
+The displacement vector is given by its \texttt{angle} $\alpha$ and its length \texttt{rad} in pts.
+{\tiny\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=50,
- actions={%
- 0 0 35 6 concentric-bands
-% dx dy
- [100 100 /offset]}]
-\pstVerb{/scaleFactor 10 1000 div def
- /xS1 100 scaleFactor mul def
- /yS1 100 scaleFactor mul def
- }%
+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 43 colors 32 concentric-rings
+45 200 shift}]
+\pstVerb{%
+/scaleFactor 10 1000 div def
+/xS1 45 cos 200 mul scaleFactor mul def
+/yS1 45 sin 200 mul scaleFactor mul def
+}%
\rput(!xS1 yS1){\psline(0.5,0)(-0.5,0)\psline(0,0.5)(0,-0.5)}
\psline[linestyle=dashed](-5,0)(5,0)
\psline[linestyle=dashed](0,-5)(0,5)
-\psline[linecolor=red]{->}(0,0)(1,1)
+\psline[linecolor=red]{->}(0,0)(2;45)
+\psarc[linecolor=red](0,0){1}{0}{45}
+\uput{0.36}[22.5](0,0){\color{red}$\alpha$}
\end{pspicture}
\end{verbatim}}
@@ -1966,30 +2083,29 @@ The displacement vector is given by \texttt{dx} and \texttt{dy} in pts.
\begin{center}
\begin{pspicture*}(-4,-1)(4,12)
\psMarble[viscosity=1000, background=0.9 0.9 0.9,
- actions={%
- 0 0 45 6 concentric-bands
- [200 -100 /offset]
+actions={%
+0 0 45 colors 26 concentric-rings
+-30 150 shift
-100 20 140
- { /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)
+ {/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)
\end{pspicture*}
\end{center}
{\small\begin{verbatim}
\begin{pspicture*}(-4,-1)(4,12)
\psMarble[viscosity=1000, background=0.9 0.9 0.9,
- actions={%
- 0 0 45 6 concentric-bands
- [200 -100 /offset]
+actions={%
+0 0 45 colors 26 concentric-rings
+-30 150 shift
-100 20 140
- { /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)
-\end{pspicture*}
+ {/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)
\end{verbatim}}
@@ -2005,25 +2121,25 @@ The displacement vector is given by \texttt{dx} and \texttt{dy} in pts.
actions={
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 75 background [0.22 0.27 0.4] /drop]
+ cx cy 75 [0.22 0.27 0.40] drop
} for
} for
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 75 background [0.49 0.75 0.79] /drop]
+ cx cy 75 [0.49 0.75 0.79] drop
} for
} for
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 75 background [0.9 0.8 0.47] /drop]
+ cx cy 75 [0.90 0.80 0.47] drop
} for
} for
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 50 background [0.98 0.27 0.317] /drop]
+ cx cy 50 [0.98 0.27 0.32] drop
} for
} for
-[ 180 [-500 100 500 {} for] 50 100 30 /rake]
+180 [11 100 0 tines] 50 100 30 rake
}](10,10)
\end{pspicture}
\end{center}
@@ -2034,25 +2150,25 @@ The displacement vector is given by \texttt{dx} and \texttt{dy} in pts.
actions={
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 75 background [0.22 0.27 0.4] /drop]
+ cx cy 75 [0.22 0.27 0.40] drop
} for
} for
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 75 background [0.49 0.75 0.79] /drop]
+ cx cy 75 [0.49 0.75 0.79] drop
} for
} for
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 75 background [0.9 0.8 0.47] /drop]
+ cx cy 75 [0.90 0.80 0.47] drop
} for
} for
-400 200 400 {/cy exch def
-400 200 400 {/cx exch def
- [ cx cy 50 background [0.98 0.27 0.317] /drop]
+ cx cy 50 [0.98 0.27 0.32] drop
} for
} for
-[ 180 [-500 100 500 {} for] 50 100 30 /rake]
+180 [11 100 0 tines] 50 100 30 rake
}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -2066,21 +2182,21 @@ The displacement vector is given by \texttt{dx} and \texttt{dy} in pts.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
- actions= {
- 0 0 40 colors length concentric-bands
- [ 0 [ 0 ] 40 200 31 /rake ]
- [ 0 0 -32e3 750 /vortex ]
- }](10,10)
+actions={
+0 0 40 colors 26 concentric-rings
+0 [0] 40 200 31 rake
+0 0 -32e3 750 vortex
+}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[
- actions= {
- 0 0 40 colors length concentric-bands
- [ 0 [ 0 ] 40 200 31 /rake ]
- [ 0 0 -32e3 750 /vortex ]
- }](10,10)
+actions={
+0 0 40 colors 26 concentric-rings
+0 [0] 40 200 31 rake
+0 0 -32e3 750 vortex
+}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -2093,53 +2209,53 @@ The displacement vector is given by \texttt{dx} and \texttt{dy} in pts.
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=500,
- actions= {
- -500 100 500
- {
- /idy exch def
- -500 100 500
- {
- /idx exch def
- [ 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
- background [0.134 0.647 1 ] /drop]
- } repeat
- [ 45 [ -400 200 600 {} for ] 40 200 31 /rake]
- [ 100 0 [ -350 ] 30 30 15 /stir ]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
- }](10,10)
+actions={
+ -500 100 500
+ {
+ /idy exch def
+ -500 100 500
+ {
+ /idx exch def
+ 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
+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
+0 0 [-150] 60 30 15 stir
+}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
\psMarble[viscosity=500,
- actions= {
- -500 100 500
- {
- /idy exch def
- -500 100 500
- {
- /idx exch def
- [ 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
- background [0.134 0.647 1 ] /drop]
- } repeat
- [ 45 [ -400 200 600 {} for ] 40 200 31 /rake]
- [ 100 0 [ -350 ] 30 30 15 /stir ]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
- }](10,10)
+actions={
+ -500 100 500
+ {
+ /idy exch def
+ -500 100 500
+ {
+ /idx exch def
+ 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
+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
+0 0 [-150] 60 30 15 stir
+}](10,10)
\end{pspicture}
\end{verbatim}}
@@ -2156,23 +2272,22 @@ 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,
- actions={
- 3
- {
- /rad 100 def
- [ 0 0 rad background [0.27 0.01 0.02] /drop]
- [ 0 0 rad background [0.78 0.02 0.1] /drop]
- [ 0 0 rad background [0.77 0.92 0.47] /drop]
- [ 0 0 rad background [0.11 0.18 0.07] /drop]
- [ 0 0 rad background [0.96 0.85 0.1] /drop]
+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 100 background [0.78 0.02 0.1] /drop]
- [ 0 0 50 background [0.77 0.92 0.47] /drop]
- [ 0 0 20 background [00.11 0.18 0.0] /drop]
+ 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
0 72 359
{
/a exch 2 mul def
- [ a sin 400 mul a cos 400 mul a sin 100 mul a cos 100 mul 10 50 /stroke ]
+ a sin 400 mul a cos 400 mul a sin 100 mul a cos 100 mul 10 50 stroke
} for
}}%
\psMarble(10,10)
@@ -2188,27 +2303,27 @@ 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,
- actions={
- 3
- {
- /rad 100 def
- [ 0 0 rad background [0.27 0.01 0.02] /drop]
- [ 0 0 rad background [0.78 0.02 0.1] /drop]
- [ 0 0 rad background [0.77 0.92 0.47] /drop]
- [ 0 0 rad background [0.11 0.18 0.07] /drop]
- [ 0 0 rad background [0.96 0.85 0.1] /drop]
+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 100 background [0.78 0.02 0.1] /drop]
- [ 0 0 50 background [0.77 0.92 0.47] /drop]
- [ 0 0 20 background [00.11 0.18 0.0] /drop]
+ 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
0 72 359
{
- /a exch 2 mul def
- [ a sin 400 mul a cos 400 mul a sin 100 mul a cos 100 mul 10 50 /stroke]
+ /a exch 2 mul def
+ a sin 400 mul a cos 400 mul a sin 100 mul a cos 100 mul 10 50 stroke
} for
}}%
\psMarble(10,10)
-\PstLens[LensMagnification=2,LensRotation=50,LensSize=2,LensShadow=false,LensStyleGlass=YellowGlass](1,-1){%
+\PstLens[LensMagnification=2,LensRotation=50,LensSize=2,LensShadow=false,%
+LensStyleGlass=YellowGlass](1,-1){%
\psMarble(10,10)}
\end{pspicture}
\end{verbatim}}
@@ -2221,56 +2336,54 @@ gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- background=0.64 0.70 0.79,
- actions={%
+\psMarble[viscosity=1000,background=0.64 0.70 0.79,
+actions={%
11 -1 1
{
/rad exch sqrt 50 mul def
- [ 0 0 rad background [0.64 0.70 0.79] /drop]
- [ 0 0 rad background [0.14 0.75 0.87] /drop]
- [ 0 0 rad background [0.95 0.74 0 ] /drop]
- [ 0 0 rad background [1 0.043 0.086 ] /drop]
+ 0 0 rad [0.64 0.70 0.79] drop
+ 0 0 rad [0.14 0.75 0.87] drop
+ 0 0 rad [0.95 0.74 0.00] drop
+ 0 0 rad [1.00 0.04 0.08] drop
} for
-500 100 0 {/xpos exch def
- [xpos -500 xpos 0 50 20 /stroke]
+ xpos -500 xpos 0 50 20 stroke
} for
0 100 500 {/xpos exch def
- [xpos 500 xpos 0 50 20 /stroke]
+ xpos 500 xpos 0 50 20 stroke
} for
-500 100 0 {/ypos exch def
- [500 ypos 0 ypos 50 20 /stroke]
+ 500 ypos 0 ypos 50 20 stroke
} for
0 100 500 {/ypos exch def
- [-500 ypos 0 ypos 50 20 /stroke]
+ -500 ypos 0 ypos 50 20 stroke
} for
}](10,10)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- background=0.64 0.70 0.79,
- actions={%
+\psMarble[viscosity=1000,background=0.64 0.70 0.79,
+actions={%
11 -1 1
{
/rad exch sqrt 50 mul def
- [ 0 0 rad background [0.64 0.70 0.79] /drop]
- [ 0 0 rad background [0.14 0.75 0.87] /drop]
- [ 0 0 rad background [0.95 0.74 0] /drop]
- [ 0 0 rad background [1 0.043 0.086] /drop]
+ 0 0 rad [0.64 0.70 0.79] drop
+ 0 0 rad [0.14 0.75 0.87] drop
+ 0 0 rad [0.95 0.74 0.00] drop
+ 0 0 rad [1.00 0.04 0.08] drop
} for
-500 100 0 {/xpos exch def
- [xpos -500 xpos 0 50 20 /stroke]
+ xpos -500 xpos 0 50 20 stroke
} for
0 100 500 {/xpos exch def
- [xpos 500 xpos 0 50 20 /stroke]
+ xpos 500 xpos 0 50 20 stroke
} for
-500 100 0 {/ypos exch def
- [500 ypos 0 ypos 50 20 /stroke]
+ 500 ypos 0 ypos 50 20 stroke
} for
0 100 500 {/ypos exch def
- [-500 ypos 0 ypos 50 20 /stroke]
+ -500 ypos 0 ypos 50 20 stroke
} for
}](10,10)
\end{pspicture}
@@ -2284,43 +2397,41 @@ gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- background=0.87 0.73 0.58,
- actions= {
+\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 background [0.298 0.370 0.247] /drop ]
+ idx idy 45 [0.298 0.370 0.247] drop
} for
} for
- [ 90 [ -400 200 600 {} for ] 40 200 31 /rake]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -350 ] 30 30 15 /stir ]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
+ 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)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\begin{pspicture}(-5,-5)(5,5)
-\psMarble[viscosity=1000,
- background=0.87 0.73 0.58,
- actions= {
+\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 background [0.298 0.370 0.247] /drop ]
+ idx idy 45 [0.298 0.370 0.247] drop
} for
} for
- [ 90 [ -400 200 600 {} for ] 40 200 31 /rake]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -350 ] 30 30 15 /stir ]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
+ 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)
\end{pspicture}
\end{verbatim}}
@@ -2333,26 +2444,30 @@ gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\begin{center}
\begin{pspicture}(-7.5,-8)(7.5,8)
-\pstVerb{/ripple 75 def
-/riplim ripple 6 mul def}%
+\pstVerb{%
+/ripple 75 def
+/riplim ripple 6 mul def
+}%
\psMarble[
- actions={
- 0 0 40 colors length concentric-bands
- [ 0 50 /offset]
- [ 0 0 [ ripple ripple riplim {} for ] 10 180 30 /stir ]
- }](15,16)
+actions={
+0 0 40 colors 26 concentric-rings
+90 50 shift
+0 0 [ripple ripple riplim {} for] 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}%
+\pstVerb{%
+/ripple 75 def
+/riplim ripple 6 mul def
+}%
\psMarble[
- actions={
- 0 0 40 colors length concentric-bands
- [ 0 50 /offset]
- [ 0 0 [ ripple ripple riplim {} for ] 10 180 30 /stir ]
- }](15,16)
+actions={
+0 0 40 colors 26 concentric-rings
+90 50 shift
+0 0 [ripple ripple riplim {} for] 10 180 30 stir
+}](15,16)
\end{pspicture}
\end{verbatim}}
@@ -2360,7 +2475,71 @@ gradmidpoint=0.5,gradangle=45,gradbegin=white,gradend=gray}
\newpage
-\textbf{Example 9: Blendmodes}
+\textbf{Example 9:}
+
+\begin{center}
+\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
+}]
+\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
+}]
+\end{pspicture}
+\end{verbatim}}
+
+
+\newpage
+
+
+\textbf{Example 10: Blendmodes}
In case one want to overlap various marblings one can use the following blendmodes:
@@ -2373,55 +2552,55 @@ The blendmode is setup right after \texttt{actions=\{} like: \texttt{/Darken .se
\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
- }](8,8)
+actions={
+50 [1 0 0] 10 random-drops
+20 [0 0 1] 50 random-drops
+15 [0 1 0] 100 random-drops
+}](8,8)
\psMarble[viscosity=1000,bckg=false,
- actions={
- /Darken .setblendmode
+actions={
+/Darken .setblendmode
-500 84 500
{
- /idy exch def
- -500 100 600
- {
- /idx exch def
- [ idx idy 45 background [0.898 0.670 0.747] /drop ]
- } for
+ /idy exch def
+ -500 100 600
+ {
+ /idx exch def
+ idx idy 45 [0.898 0.670 0.747] drop
+ } for
} for
- [ 90 [ -400 200 600 {} for ] 40 200 31 /rake]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -350 ] 30 30 15 /stir ]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
+ 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
}](8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
-\begin{pspicture}(-5,-5)(5,5)
+\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
- }](10,10)
+actions={
+50 [1 0 0] 10 random-drops
+20 [0 0 1] 50 random-drops
+15 [0 1 0] 100 random-drops
+}](8,8)
\psMarble[viscosity=1000,bckg=false,
- actions={
- /Darken .setblendmode
+actions={
+/Darken .setblendmode
-500 84 500
{
- /idy exch def
- -500 100 600
- {
- /idx exch def
- [ idx idy 45 background [0.898 0.670 0.747] /drop ]
- } for
+ /idy exch def
+ -500 100 600
+ {
+ /idx exch def
+ idx idy 45 [0.898 0.670 0.747] drop
+ } for
} for
- [ 90 [ -400 200 600 {} for ] 40 200 31 /rake]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -350 ] 30 30 15 /stir ]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
- }](10,10)
+ 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
+ }](8,8)
\end{pspicture}
\end{verbatim}}
@@ -2429,7 +2608,7 @@ The blendmode is setup right after \texttt{actions=\{} like: \texttt{/Darken .se
\newpage
-\textbf{Example 10: Transparency}
+\textbf{Example 11: Transparency}
In case one want to overlap various marblings one can also use transparency:
@@ -2440,54 +2619,54 @@ The transparency is setup right after \texttt{actions=\{} like: \texttt{0.45 .se
\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
- }](8,8)
+actions={
+50 [1 0 0] 10 random-drops
+20 [0 0 1] 50 random-drops
+15 [0 1 0] 100 random-drops
+}](8,8)
\psMarble[viscosity=1000,bckg=false,
- actions={
- 0.45 .setopacityalpha
+actions={
+0.45 .setopacityalpha
-500 84 500
{
- /idy exch def
- -500 100 600
- {
- /idx exch def
- [ idx idy 45 background [0.898 0.670 0.747] /drop ]
- } for
+ /idy exch def
+ -500 100 600
+ {
+ /idx exch def
+ idx idy 45 [0.898 0.670 0.747] drop
+ } for
} for
- [ 90 [ -400 200 600 {} for ] 40 200 31 /rake]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -350 ] 30 30 15 /stir ]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
+ 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
}](8,8)
\end{pspicture}
\end{center}
{\small\begin{verbatim}
\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
- }](8,8)
+actions={
+50 [1 0 0] 10 random-drops
+20 [0 0 1] 50 random-drops
+15 [0 1 0] 100 random-drops
+}](8,8)
\psMarble[viscosity=1000,bckg=false,
- actions={
- 0.45 .setopacityalpha
+actions={
+0.45 .setopacityalpha
-500 84 500
{
- /idy exch def
- -500 100 600
- {
- /idx exch def
- [ idx idy 45 background [0.898 0.670 0.747] /drop ]
- } for
+ /idy exch def
+ -500 100 600
+ {
+ /idx exch def
+ idx idy 45 [0.898 0.670 0.747] drop
+ } for
} for
- [ 90 [ -400 200 600 {} for ] 40 200 31 /rake]
- [-90 [ -500 200 600 {} for ] 40 200 31 /rake]
- [ 0 0 [ -350 ] 30 30 15 /stir ]
- [ 0 0 [ -150 ] 60 30 15 /stir ]
+ 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
}](8,8)
\end{pspicture}
\end{verbatim}}
diff --git a/Master/texmf-dist/dvips/pst-marble/pst-marble.pro b/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
index 478b39d677a..4353cf2db33 100644
--- a/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
+++ b/Master/texmf-dist/dvips/pst-marble/pst-marble.pro
@@ -1,22 +1,17 @@
%%Creator: Aubrey Jaffer
%%For: Voluntocracy
-%%Copyright: 2018 Aubrey Jaffer
+%%Copyright: 2018, 2019 Aubrey Jaffer
%%Creator: Aubrey Jaffer
%%For: Voluntocracy
-%%CreationDate: 2018-10-19
+%%CreationDate: 2019-01-19
/plotdict 100 dict def
plotdict begin
- /URL (http://people.csail.mit.edu/jaffer/Marbling) def
- /pi 3.141592653589793 def
- /e 2.718281828459045 def
- /e^-1 1 e div def
- /m4o3 -4 3.0 div def
-
-%% depend on rendering direction:
-%/zsgn 0 def
-
/URL (http://people.csail.mit.edu/jaffer/Marbling) def
+/pi 3.141592653589793 def
+/e 2.718281828459045 def
+/e^-1 1 e div def
+/m4o3 -4 3.0 div def
% negative viscosity for (raster) reverse-marbling
/marble % nu (viscosity)
@@ -75,7 +70,7 @@ plotdict begin
do-raster
}
{
- orgx orgy translate
+% orgx orgy translate
scl 1.0 div dup scale
do-drops
} ifelse
@@ -96,10 +91,10 @@ plotdict begin
{vortex-deformation}
{
ct /wiggle eq
- {wiggle}
+ {wiggle-deformation}
{
ct /offset eq
- {offset}
+ {offset-deformation}
{(unrecognized token) = ct =} ifelse
} ifelse
} ifelse
@@ -140,14 +135,14 @@ plotdict begin
} loop
} bind def
-/offset % px py dx dy --> px py
+/offset-deformation % px py dx dy --> px py
{
/dy exch .001 mul def /dx exch .001 mul def
dy reverse-rendering? {neg} if add exch
dx reverse-rendering? {neg} if add exch
} bind def
-/wiggle % px py ang {func} --> px py
+/wiggle-deformation % px py ang {func} --> px py
{
/func exch def /ang exch def
/dy ang cos def /dx ang sin def
@@ -156,6 +151,16 @@ plotdict begin
px dx a mul add py dy a mul add
} bind def
+/tines % cnt spacing ofst
+{
+ /ofst exch def
+ /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
@@ -379,7 +384,7 @@ plotdict begin
/disc exch def
disc 0. le
{
- disc -1e-3 le
+ disc -0.001 le
{rgb}
{
/a disc neg sqrt sharpen def
@@ -433,7 +438,7 @@ plotdict begin
% 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 background
+/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
@@ -450,27 +455,97 @@ plotdict begin
% [ angle {func} /wiggle ]
% [ dx dy /offset ]
-/Q 1 def
+/color-norm { % rgb
+ /rgb exch def
+ rgb {1 gt} forall or or { [ rgb {255 div} forall ] } { rgb } ifelse
+} bind def
+
+/drop { % cx cy radinc rgb
+ /rgb exch def
+ /radinc exch def
+ /cy exch def
+ /cx exch def
+ [ cx cy radinc -1 rgb color-norm /drop ]
+} bind def
+
+/stir { % cx cy [ r ] w th D
+ /stir 7 array astore
+} bind def
+
+/vortex { % cx cy circ t
+ /vortex 5 array astore
+} bind def
+
+/stroke { % bx by ex ey V D
+ /stroke 7 array astore
+} bind def
-/concentric-bands {
-% xc yc radius increment number of bands % [array of colors]
-% [array of colors] c'est le tableau donné en paramètres colors=
- /nbands exch def
+/rake { % angle [ r ] V tU D
+ /rake 6 array astore
+} bind def
+
+/wiggle { % angle {func}
+ /wiggle 3 array astore
+} bind def
+
+/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
+ /cnt exch def
+ /clra exch def
/rinc exch def
/yc exch def
/xc exch def
- 11 -1 1
- {
- /rad exch sqrt rinc mul def
- /cnt 0 def
- nbands {
- [ xc yc rad background colors cnt colors length mod get /drop]
- /cnt cnt 1 add def
- } repeat
- } for
- [ xc yc rinc 2 div background colors 0 get /drop]
-} 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
+/arc-drops { % xc yc r ang-strt ang-step rgb cnt drad
+ /drad exch def
+ /cnt exch def
+ /rgb exch def
+ /ang-step exch def
+ /ang-strt exch def
+ /r exch def
+ /yc exch def
+ /xc exch def
+ ang-strt ang-step ang-strt ang-step cnt 1 sub mul add
+ {
+ /th exch def
+ th sin r mul xc add th cos r mul yc add drad rgb drop
+ } for
+} bind def
+
+/spiral-drops { % xc yc r ang-strt ang-step rinc rgb cnt drad
+ /drad exch def
+ /cnt exch def
+ /rgb exch def
+ /rinc exch def
+ /ang-step exch def
+ /ang-strt exch def
+ /r exch def
+ /yc exch def
+ /xc exch def
+ ang-strt ang-step ang-strt ang-step cnt 1 sub mul add
+ {
+ /th exch def
+ th sin r mul xc add th cos r mul yc add drad rgb drop
+ /r r rinc add def
+ } for
+} bind def
+
+%
/random-drops {
/count exch def
/color exch def
@@ -481,7 +556,7 @@ count
random:uniform 1100 mul 550 sub
random:uniform 1100 mul 550 sub
e random:uniform exp size mul
- background color /drop
+ -1 color /drop
]
} repeat
} def
@@ -495,13 +570,11 @@ count
random:uniform 1100 mul 550 sub
random:uniform 1100 mul 550 sub
e random:uniform exp size mul
- background colors random:uniform colors length mul floor cvi get /drop
+ -1 colors random:uniform colors length mul floor cvi get /drop
]
} repeat
} def
end
-
-
-
-
-
+% Local Variables:
+% mode: PS
+% End:
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 9f188063ac0..8d1245ea5a2 100644
--- a/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
+++ b/Master/texmf-dist/tex/generic/pst-marble/pst-marble.tex
@@ -5,10 +5,10 @@
%% IMPORTANT NOTICE: %%
%% %%
%% Package `pst-marble' %%
-%% Copyright (C) 2018 Aubrey Jaffer %%
%% %%
%% Aubrey Jaffers, with help of Manuel Luque, Jürgen Gilg %%
%% Email address: agj@alum.mit.edu %%
+%% Copyright (C) 2018-2019 Aubrey Jaffer %%
%% %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
@@ -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.0}
-\def\filedate{2018/10/19}
+\def\fileversion{1.1}
+\def\filedate{2019/01/23}
\message{`PST' v\fileversion, \filedate}
%
\pstheader{pst-marble.pro}
@@ -35,61 +35,54 @@
\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}{resolution}{\def\pst@marble@resolution{#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=1 1 1,
+\psset[pst-marble]{background=0 0 0,
viscosity=1000,
- bckg=true,
- actions=0 0 40 colors length concentric-bands,
+ actions={0 0 35 colors 35 concentric-rings},
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]
-},
- drawcontours=false
+ [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
}%
\def\psMarble{\def\pst@par{}\pst@object{psMarble}}
\def\psMarble@i{\@ifnextchar({\psMarble@ii}{\psMarble@ii(10,10)}}
\def\psMarble@ii(#1,#2){%
\begin@SpecialObj
\addto@pscode{%
+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] def
+/background [\pst@marble@background] color-norm def
/colors [\pst@marble@colors] def
/pagewidth #1 cm def % en cm
/pageheight #2 cm def % en cm
-\pst@number\pslinewidth\space 1000 div setlinewidth
-plotdict begin
/loy pageheight -2 div def
/hiy pageheight 2 div def
/hix pagewidth 2 div def
/lox pagewidth -2 div def
/orgx hix lox add 2 div def
/orgy hiy loy add 2 div def
-orgx orgy translate
-/actions [ \pst@marble@actions ] def
+% orgx orgy translate
+/actions [\pst@marble@actions] def
/acnt actions length def
-\ifPst@drawcontours /Contours {stroke} def \else /Contours {fill} def \fi
-\ifPst@bckg
+\ifPst@drawcontours /Contours {STROKE} def \else /Contours {fill} def \fi
gsave
+\ifPst@bckg
background aload pop setrgbcolor
lox loy pagewidth pageheight rectfill
-grestore
\fi
-gsave
lox loy pagewidth pageheight rectclip
- \pst@marble@visc marble
+ \pst@marble@visc marble
grestore
-end
- }% fin du code ps
- \end@SpecialObj
- }% % fin de la commande PSTricks
+end}% fin du code ps
+\end@SpecialObj}% % fin de la commande PSTricks
\catcode`\@=\PstAtCode\relax
\endinput \ No newline at end of file
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 63a68a01981..1d22201ee75 100644
--- a/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
+++ b/Master/texmf-dist/tex/latex/pst-marble/pst-marble.sty
@@ -1,34 +1,11 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% %%
-%% This is file `pst-marble.sty' %%
-%% %%
-%% IMPORTANT NOTICE: %%
-%% %%
-%% Package `pst-marble' %%
-%% Copyright (C) 2018 Aubrey Jaffer %%
-%% %%
-%% Aubrey Jaffers, with help of Manuel Luque, Jürgen Gilg %%
-%% Email address: agj@alum.mit.edu %%
-%% %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Project Public License %%
-%% Distributed from CTAN archives in directory %%
-%% macros/latex/base/lppl.txt; either version 1.3c of %%
-%% the License, or (at your option) any later version. %%
-%% %%
-%% DESCRIPTION: %%
-%% `pst-marble' is a PSTricks package to draw marble-like patterns %%
-%% %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
\RequirePackage{pstricks}
-\ProvidesPackage{pst-marble}[2018/10/19 package wrapper for PSTricks pst-marble.tex]
+\ProvidesPackage{pst-marble}[2019/01/24 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}
- [2018/10/19 v. 1.0, PostScript prologue file ]
+ [2019/01/24 v. 1.1, PostScript prologue file ]
\@addtofilelist{pst-marble.pro}}{}%
\endinput