Governance by those who do the work.
Showing posts with label paint marbling. Show all posts
Showing posts with label paint marbling. Show all posts
Saturday, September 21, 2019
Real-time interactive mathematical marbling
Blake Jones has done some righteous coding, creating a GPU implementation of the Oseen flow in paint marbling algorithm which executes so fast that it renders the marbling from arbitrary stylus movements interactively in real time! The first video on his Turing clouds webpage shows the system in action.
Labels:
mathematical marbling,
Oseen flow,
paint marbling
Thursday, February 7, 2019
Mathematical Marbling How-To
http://people.csail.mit.edu/jaffer/Marbling/How-To
Pst-marble (and documentation) is a CTAN package for the LaTeX document system. If you have LaTeX and CTAN installed on your computing device, then you can create marblings locally. https://www.latex-project.org/get/ has the downloads and instructions for installing LaTeX and CTAN on GNU/Linux, MacOS, and Windows.
For those with a web-browser, it is easy to create marblings online. Papeeria.com provides an online LaTeX workbench with free and paid accounts. The marbling example files will render in less than one minute; so a free account is sufficient for exploring. If you create more complicated designs, you can upgrade to a paid Papeeria account or install LaTeX and CTAN on a (larger) computing device.
Low resolution rendering of Nonpareil.tex
Returning to the Nonpareil.tex code: After
the \psMarble line there are several sections bounded by
curly braces { and }.
The
The
Comment out four lines of the
0 0 48 [(c28847) [231 204 155] [0.635 0.008 0.094]] 25 concentric-rings Next, uncomment the first two
"
Raking left and right increases the number of color bands. The next step will rake downward with 25 tines. While we could specify their positions as 25 numbers between brackets, pst-marble offers a utility for generating evenly spaced tines:
The pst-marble reference card gives brief descriptions of all the
Copyright © 2019 Aubrey Jaffer
Paint marbling is a process of dropping colored paints onto a liquid bath and raking (combing) them to create intricate designs. Based on my mathematical theory of marbling, Jürgen Gilg, Manuel Luque, and I have created the pst-marble software to enable anyone with an internet browser to create their own digital marbled designs.
Pst-marble (and documentation) is a CTAN package for the LaTeX document system. If you have LaTeX and CTAN installed on your computing device, then you can create marblings locally. https://www.latex-project.org/get/ has the downloads and instructions for installing LaTeX and CTAN on GNU/Linux, MacOS, and Windows.
For those with a web-browser, it is easy to create marblings online. Papeeria.com provides an online LaTeX workbench with free and paid accounts. The marbling example files will render in less than one minute; so a free account is sufficient for exploring. If you create more complicated designs, you can upgrade to a paid Papeeria account or install LaTeX and CTAN on a (larger) computing device.
- Download pst-marble-v1.4.zip (15 kB) onto your computing device.
- Go to http://Papeeria.com and create a free account for yourself and a "project" with whatever name you like.
- From the top left pull-down select Upload Project, then Choose files and select pst-marble-v1.4.zip which you just downloaded. Then click Open.
- In the Project tab you should then see a list of filenames. The files with capitalized first letter and ending with .tex are the marbling example files.
- Click on Nonpareil.tex and you will see lines of text which are a small marbling program. Find the Papeeria Compile pull down and click on Nonpareil.tex. In less than 30 seconds a colorful design will appear in the PDF tab (you may need to install a PDF viewer on your device).

Low resolution rendering of Nonpareil.tex
colors=
section accepts RGB colors in three formats.
- [0.906 0.8 0.608]
- Red, green, and blue color components between 0 and 1 in square brackets.
- [231 204 155]
- Red, green, and blue color components between 0 and 255 in square brackets.
- (e7cc9b)
- Red, green, and blue (RRGGBB) hexadecimal color components between 00 and fF in parentheses.
%
is the comment character
in .tex files. Text to the right of %
is
ignored to the end-of-line. Try commenting out some color
lines, then click on Papeeria's Compile button; you should
see fewer colors in the resulting marbling PDF.
The
actions=
section in Nonpareil.tex
specifies the marbling design through a sequence of numbers
(arguments) and commands separated by whitespace. The system
is a bit unusual in that the command is to the right of its
arguments. The leftmost two arguments to most of the commands
are the x and y coordinates of the center of the
marbling action. 0 0
for the first two
arguments specifies the center of the design. The
visible x and y for a square image are from -500 to
+500; but the virtual tank is infinite in size.
Comment out four lines of the
actions=
section so that
it looks like this; then Compile:
0 0 48 colors 25 concentric-rings % 90 [-150 450] 100 750 31 rake % -90 [-150 450] 100 750 31 rake % 180 [ 25 50 0 tines ] 30 200 31 rake % 0 230 shiftYou should now see concentric colored rings in the PDF viewer. These are produced by
concentric-rings
command:
- x y Ri [rgb ...] n concentric-rings
- Places n rings in color sequence [rgb ...] centered at location x,y, each ring having thickness Ri.
colors
argument refers to the color
sequence from the colors=
section. It can be replaced
by a literal color sequence; for instance:
0 0 48 [(c28847) [231 204 155] [0.635 0.008 0.094]] 25 concentric-rings Next, uncomment the first two
rake
lines so that
the actions=
section looks like this;
then Compile:
0 0 48 colors 25 concentric-rings 90 [-150 450] 100 750 31 rake -90 [-150 450] 100 750 31 rake % 180 [ 25 50 0 tines ] 30 200 31 rake % 0 230 shift
- θ [R ...] V S D rake
- Pulls tines of diameter D at θ degrees clockwise from the positive y-axis through the virtual tank at velocity V, moving fluid on the tine path a distance S. The tine paths are spaced [R ...] from the tank center at their nearest points.
90 [-150 450] 100 750 31 rake
" rakes two tines from
left to right.
"
-90 [-150 450] 100 750 31 rake
" rakes two tines from
right to left. The tine tracks are distinct from the previous two
because they are rotated 180 degrees. It is important to offset the
tines so that rakes in opposite direction do not cancel each other
out. You can see this cancellation by changing [-150
450]
to [-300 300]
in both lines.
Raking left and right increases the number of color bands. The next step will rake downward with 25 tines. While we could specify their positions as 25 numbers between brackets, pst-marble offers a utility for generating evenly spaced tines:
- [n S Ω tines]
- The tines command and its arguments are replaced by a sequence of n numbers. The difference between adjacent numbers is S and the center number is Ω when n is odd and S/2−Ω when n is even.
[2 600 -150 tines]
is equivalent to
[-150 450]
. For the 25 tine rake, uncomment
the rake
line in actions=
so that it looks like this;
then Compile:
0 0 48 colors 25 concentric-rings 90 [-150 450] 100 750 31 rake -90 [-150 450] 100 750 31 rake 180 [ 25 50 0 tines ] 30 200 31 rake % 0 230 shiftThe top quarter of the marbling is less densely threaded than the rest of the marbling. This is because, by raking downward without a compensating upward raking, the whole design has been moved downward. To recenter it pst-marble offers:
- θ R shift
- Shifts tank by R at θ degrees clockwise from vertical.
shift
line will center the nonpareil
design; the value 230 was arrived at by trial and error:
0 0 48 colors 25 concentric-rings 90 [-150 450] 100 750 31 rake -90 [-150 450] 100 750 31 rake 180 [ 25 50 0 tines ] 30 200 31 rake 0 230 shiftThe nonpareil design is common in marbling, and is the basis for more complicated designs as well. You can easily alter the appearance by changing the
actions=
code.
The pst-marble reference card gives brief descriptions of all the
actions=
commands. The next
installment in this tutorial series
explains how to rake curves.
Copyright © 2019 Aubrey Jaffer
Topological Computer Graphics | ||
Go Figure! |
Labels:
mathematical marbling,
nonpareil,
paint marbling,
pst-marble
Wednesday, January 16, 2019
Mathematical Marblilng Software
Jürgen Gilg and Luque Manuel have collaborated to create the pst-marble package on CTAN.org which lets you create your own mathematical marblings using LaTeX. https://ctan.org/pkg/pst-marble
http://pstricks.blogspot.com/2018/09/the-marbled-paper-with-pstricks.html
show nice examples of marblings you can create with pst-marble.
You can now create pst-marble designs online! The first tutorial (about the nonpareil pattern) is https://voluntocracy.blogspot.com/2019/02/mathematical-marbling-how-to.html
Labels:
CTAN,
LaTeX,
mathematical marbling,
paint marbling
Wednesday, October 10, 2018
The Lamb-Oseen Vortex and Paint Marbling
Just published The Lamb-Oseen Vortex and Paint Marbling on arXiv.
The image to the left shows the decay with time of the Lamb-Oseen vortex (starting from an impulse of circulation at the center point).
The image to the right shows the same vortex, but with exponentially increasing time. The rotational shear propagates to larger and larger orbits while the center returns to rest. While this animation returns to its original position, it could come to rest at any angle controlled by the magnitude of the initial circulation.
More about mathematical marbling.
Wednesday, August 15, 2018
Vortex marbling in Jupiter's great spot
![]() |
Image from NASA's Juno spacecraft 2018-04-01 |
Friday, July 27, 2018
Bubbles in Marbling
![]() | |
Bubbles and parted paints |
While the formation of bubbles could be due to non-Newtonian fluid behavior, it is worth examining the conditions assuming a Newtonian fluid. A 25 mm diameter dowel submerged 12.5 mm will behave more like half of a 25 mm diameter sphere than a cylinder. If the kinematic viscosity (ν=0.001 m2/s) of the liquid is 1000 times that of water, then the Reynolds number is about 5, far less than the 90 needed to spawn vortexes. Re is inversely proportional to viscosity; reducing the kinematic viscosity by a factor of 10 raises Re to 50.
A half sphere of diameter d has buoyant-pressure (restoring force divided by cross-section area) of about 81 N/m2. Surface tension pressure (restoring force divided by cross-section area) of water is roughly 3.7 N/m2.
Drag is the force on the object moving through the tank fluid. There must be an equal and opposite net force on the liquid. Drag D for a sphere is the product of the friction coefficient CD, frontal area (π/4*d2), and dynamic head V2*ρ/2 (for water ρ=997). That force divided by the frontal area of the object is a pressure (suction actually).
A bubble will be formed if this suction behind the moving stylus is larger than the sum of the restoring forces at the liquid surface.
For ν=1000 mm2/s (1000 times that of water) the suction behind our 25 mm diameter dowel is 88 N/m2, which exceeds the restoring pressures 81 N/m2 and 3.7 N/m2, and bubbles can result.
The slower motions and smaller styluses that the St.Johns usually use have Reynolds numbers much smaller than 5. Thus the marblings they create don't evidence inertial effects (versus the mushroom designs of my previous post).
![]() | |
"Mushroom" flow from straight strokes |
In water, a 5 mm cylinder moving at 2 cm/s would shed vortexes 3 cm apart. A 1 mm diameter stylus moved in a straight path at 5 cm/s would not shed vortexes.
So existing evidence of Karman (shed) vortexes is only likely to be found in marbling produced on a tank filled with water.
Monday, July 9, 2018
Vortexes in Marbling
This image from the on-line Getty collection is busier, but shows some of the same features.
![]() | ||
Autograph album of Johann Joachim Prack von Asch Publication date 1587 In the collection of the Getty Research Institute https://archive.org/stream/gri_33125012902959#page/n151 |
"Vortex shedding in Water" from "Harvard Natural Sciences Lecture Demonstrations" shows vortexes being shed from a cylinder at flow speeds in the range of marbling strokes.
My work has focused on laminar and Oseen flows https://arxiv.org/abs/1702.02106 in Newtonian fluids which successfully model most common marbling techniques.
At the lowest Reynolds numbers is Stokes flow, where the passage of the stylus displaces the liquid only temporarily. The next range of Reynolds numbers produces Oseen flow, where viscous forces dominate inertial forces. Straight strokes of finite length result in persistent movement along the stroke and rotation to both sides of the stroke. As the inertial forces grow relative to viscous forces, instabilities such as vortex shedding appear (Re ≥ 90). Much higher Reynolds numbers (≥ 40000) can produce turbulence.
To answer vortex question and to better quantify the fluid dynamics parameters of marbling, Dan and Regina St.John, the Chena River Marblers, recently hosted a session where we performed experiments using their equipment and expertise.
The idea was to increase the Reynolds number of marbling strokes by increasing the stylus size and speed until instabilities such as vortexes appeared. We increased the stylus size to 25 mm, but instabilities did not appear. We increased the speed to the point that it created a tear and bubbles in the paints, but no vortexes appeared. The tear indicates that the assumption that the fluid is Newtonian may not be valid; and the properties of carageenan used to make the "sizing" in the tank are complicated. Note: my later post finds that Newtonian fluids can produce these behaviors.

Reynolds number being the characteristic length times the velocity divided by the kinematic viscosity, the only other thing to try was reducing the viscosity. Diluting the sizing by half with water resulted in a sea change. Instead of fluid motion stopping when the stylus stopped, it would glide for as long as 5 seconds before coming to rest, showing that inertia was in play. Stylus strokes at speeds around 25.cm/s (which is fast for marbling) created the mushroom shapes pictured. Although the St.Johns were able to find an example of this shape in one of their books, it is not a common marbling motif. Looking back at the photo of the 16th century marbling, mushrooms are present.
Are these mushrooms due to flow instabilities? No. The mushrooms appear where the stylus was stopped. In vortex shedding, the vortexes are shed to alternating sides of the ongoing stroke. Even for a fast stroke, the train behind the stylus was smooth and without wiggles.
We know from the video of vortex shedding that it happens in water. Viscosity near that of water may be required in order to see it in marbling.
There is more of interest here. The mushrooms in our marbling have smaller mushrooms inside of them. In the photograph, I have outlined mushrooms at 3 different scales. The mushroom in the smallest box ls less obvious than the others; perhaps because the bands of color comprising it are larger relative to its size.
Pure Oseen flow is reversible; reversing the flow at the origin returns the system to its original state. With its sub-mushrooms, the mushroom flow does not look reversible.
Subscribe to:
Posts (Atom)