From d4802db53ea2e712cd0acfb472b73891de14e27c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 26 Jan 2019 22:57:13 +0000 Subject: pst-marble (26jan19) git-svn-id: svn://tug.org/texlive/trunk@49824 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/generic/pst-marble/CHANGES.md | 70 +- Master/texmf-dist/doc/generic/pst-marble/README.md | 24 +- .../doc/generic/pst-marble/examples/Blobs.pdf | Bin 0 -> 673946 bytes .../doc/generic/pst-marble/examples/Blobs.tex | 59 + .../doc/generic/pst-marble/examples/Bouquet.pdf | Bin 0 -> 357739 bytes .../doc/generic/pst-marble/examples/Bouquet.tex | 29 + .../doc/generic/pst-marble/examples/ex1.pdf | Bin 0 -> 544475 bytes .../doc/generic/pst-marble/examples/ex1.tex | 27 + .../doc/generic/pst-marble/examples/ex2.pdf | Bin 0 -> 419957 bytes .../doc/generic/pst-marble/examples/ex2.tex | 27 + .../doc/generic/pst-marble/examples/ex3.pdf | Bin 0 -> 535630 bytes .../doc/generic/pst-marble/examples/ex3.tex | 18 + .../doc/generic/pst-marble/examples/ex4.pdf | Bin 0 -> 1277025 bytes .../doc/generic/pst-marble/examples/ex4.tex | 38 + .../doc/generic/pst-marble/examples/ex5.pdf | Bin 0 -> 470361 bytes .../doc/generic/pst-marble/examples/ex5.tex | 17 + .../doc/generic/pst-marble/pst-marble-doc.pdf | Bin 22833647 -> 18660849 bytes .../doc/generic/pst-marble/pst-marble-doc.tex | 1553 +++++++++++--------- 18 files changed, 1162 insertions(+), 700 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.tex create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.tex create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex1.tex create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex2.tex create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex3.tex create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex4.tex create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf create mode 100644 Master/texmf-dist/doc/generic/pst-marble/examples/ex5.tex (limited to 'Master/texmf-dist/doc') 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/Blobs.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/Bouquet.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/ex1.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/ex2.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/ex3.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/ex4.pdf 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 Binary files /dev/null and b/Master/texmf-dist/doc/generic/pst-marble/examples/ex5.pdf 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 Binary files a/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf and b/Master/texmf-dist/doc/generic/pst-marble/pst-marble-doc.pdf 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 {\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 }(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