The essential feature I am trying to produce is that when a tine moves
through regions of different color inks, it stretches the boundaries
between the inks to bend around it. If a blue ink region is
surrounded by a red ink region, in the deformation induced by the
movement of the tine through it, the blue region is still surrounded
by the red region.
A mapping taking each point in the plane to its destination after the
tine has moved through the area will be represented by a vectorvalued
function F from a plane (ℝ×ℝ) to a plane.
Further, F will be a
homeomorphism,
a continuous bijection.
The
functional composition
of homeomorphisms is also a homeomorphism. So if we have a
homeomorphism for a single stroke, we can compose the functions
representing each movement together to create a more complicated
homeomorphism where F_{1} will be the first
stroke and F_{n} will be the last stroke of the sequence:
F =
F_{n} ∘
F_{n−1} ∘
… ∘ F_{1}

Note that order is important here. The last stroke, F_{n},
will be the most obvious in the marbled image.
Ink boundary curves which are continuous in the plane are mapped to
continuous curves by homeomorphisms, no matter how much they fold and
stretch. In order for homeomorphisms to remain reversible, we set a
maximum displacement z for the deformation each tine
introduces.
2Dimensional Fluid Mechanics
Consider an unbounded plane containing a 2dimensional incompressible
Newtonian fluid
with
laminar flow.
Associated with F(x,y) is a vector field
H(x,y)=F(x,y)(x,y)
returning the vector displacement at each coordinate. Along
the y axis we introduce a displacement z,
H(0,y)=(0,z)
[F(0,y)=(0,y+z)]. This
displacement will not affect points far away from the x axis;
so the limit of H(x,y) tends to zero as
the magnitude of x grows. Because the fluid is incompressible,
the divergence
of H is zero everywhere. Because its flow is laminar, it is
uniform in the direction of motion, y:
Thus H(x,y) depends only on x.
Furthemore, only the y component
of H(x,y) depends on x.
Let f(x)=H_{y}(x,0);
then f(0)=z.
f(x) is
even;
the displacements to either side of x=0 will be equal and in
the same direction. So we will consider f(x)
for x≥0 only. Because the flow is laminar, displacements
induced by z travel along the x axis should be
proportional to z. Let A=f(a).
Then f(2a) will be reduced from A by the same
proportion as A was reduced from z.
f(2a)  =  A^{2} z
 ; thus 
 f(2a) f(0)
 =  A^{2} z^{2}
 =  f(a)^{2} f(0)^{2}

The only continuous real functions satisfying these constraints
are f(x)=z·u^{x}
with independent parameter 0<u<1 related to the
viscosity.
A key property of this marbling transform is that the displacement
parallel to the line is dependent only on the perpendicular distance
from the line. Because of this, the inverse transform is simply the
forward transform with its displacement negated. We will use this
property later on.
It is remarkable that an exact, closedform expression is derived for
the asymptotic equilibrium of a fluiddynamics problem using little
more than boundary conditions and symmetry.
About PostScript
Most of the marbling images are linked to PostScript files (with
a ".ps"
suffix). PostScript
is a programming language; but these files use a very limited
subset. There are links to language reference manuals and tutorials
at the bottom
of http://en.wikipedia.org/wiki/PostScript#The_language.
You can run PostScript programs and view the images they generate
using GSview, available from
http://pages.cs.wisc.edu/~ghost/gsview.
Inks
At the start of the real marbling process, inks are dropped from one
or more locations to form expanding disks on a substrate. The
mathematics is described in
Dropping Ink. For now, we just
want an ink pattern which shows subsequent displacements. In my first
renderings, 5 virtual inks are dropped from the center to form 25
concentric rings of equal radial width.
The boundaries between virtual ink rings will be traversed using the
Minsky
circle algorithm; although walking the circles using coordinates
generated by sin and cos would work as well. The
angular step size is made inversely proportional to the ring radius,
making the distance between successive points uniform.
[These images are linked to the
PostScript files which generated them.]
A Single Stroke
For a single tine's vertical stroke, each (x, y)
coordinate in the inkcircle plane is mapped to
F_{v}(x, y):
F_{v}(x, y) =^{ }
 (
 x, y +
z·u^{x−xL}
 )

F_{v} displaces each point vertically by
an amount exponentially decreasing with horizontal distance from the
tine's xcoordinate x_{L}.
Parameters
The scalars z and u control the maximum displacement and
sharpness of the bends, respectively. An earlier version of this work
used hyperbolic approximations parametrized by (z
and) c>0. A rough equivalence
is u=1/2^{1/c}. The larger z is,
the larger the maximum displacement. The smaller c is, the
sharper the bends are.
The transform for straight, horizontal strokes is to displace each
point horizontally by an amount exponentially decreasing with vertical
distance from the tine's ycoordinate
y_{L}:
F_{h}(x, y) =^{ }
 (

z · u
^{y−yL}
+ x, y
 )

Rendering
The lines connecting the mapped coordinates of points adjacent on the
circle form a closed curve. The region inside this boundary curve is
then filled with the outermost ink color.
This rendering process, implemented directly in PostScript, is
repeated for the next largest circle and so on until the projections
of all the ink circles have been filled with their respective ink
colors.
Multiple Strokes
Because the composition of homeomorphisms is a homeomorphism, the
mapping functions for the strokes can be composed, forming a single
function. With this composite function taking the place of the single
stroke function in the above algorithm, we are marbling!
After verifying that a combing and its reverse (eg. North and South)
cancel each other, the next combing sequence to try is a
commutator.
Where operators do not commute, composing operators and their inverses
in an asymmetrical sequence often reveals essential properties of
their mathematical interactions.
The image to the right is the result of straight combings (7 tines)
in the North, East, South, then West directions.
[These images are linked to the PostScript files which
generated them.]
The image to the left was combed North, East, South, then East.
Although the depth of combing was the same as the previous picture,
its character is very different.
Generalizations
This calculation can be extended to lines with arbitrary slope. If
L is the tineline, N is a unit vector perpendicular to
L, B a point on the tine line, and P a point,
then P's minimum distance from the line is d, the length
of the projection of vector PB onto
N:
Given M, the unit vector in the direction of the tine line
L, the (vector) mapping for point P is:
F_{L}(P) =^{ } P + z · u^{d}
· M

Circular tine tracks are also compatible with laminar incompressible
flow. In this case points are displaced along arcs around a center
point
C.
Because the displacements tend to zero far from the center, outside of
the tine track the exponentially decreasing magnitude of the
displacements again applies. Inside of the tine track, however,
asymptotic considerations don't apply. This finite area could, for
instance, rotate as a rigid disk. Using the same formula on the
inside as the outside lets circular tine tracks with very large radii
behave similarly to straight tine tracks.
The length l of the displacement arc, and its angle a
subtended at C are:
l =
z · u^{d}

 a =
 l
P−C

The point P is thus mapped to:
F_{C}(P) =^{ } C + (P−C)
·  (
 cos a −sin a

 sin a cos a
 )

The figure to the left shows the paths of the virtual tines moving
through the field of view. Those clockwise circular motions result in
the marbling shown to the right.
Arcs of increasing radius whose centers track away from the field of
view create a fan like that at the top of this article.
Vortex
Outside the circle of radius r consider the arclength l
as a function of the distance h between P
and C, z, u, and r:
It follows that:
l(h,z,u,r)
= z·u^{h−r}
= (z·u^{−r})u^{h}
= l(h,z·u^{−r},u,0)

This allows us to reduce the fourth argument to zero, resulting in a
vortex centered at C. Given z, u, and r
for a vortex, the length l of the displacement arc, and its
angle a subtended at C are:
h = P−C

 l =
(z·u^{−r}) · u^{h}

 a =
 l
h

If h = 0, then
F_{V}(C) = C.
Otherwise, h > 0, and the point P is mapped to:
F_{V}(P) =^{ } C + (P−C)
·  (
 cos a −sin a

 sin a cos a
 )

Short Strokes
The deformation caused by a arbitrarily thin tine being inserted;
moved a short distance; then extracted turns out to require fluid
mechanics theory to solve. Read Oseen Flow
in Ink Marbling
(on arXiv) for the
full story.
The next chapter deals with tine tracks with
other than straight or circular trajectories.
Copyright © 2003, 2004, 2007, 2010, 2011, 2016, 2017 Aubrey Jaffer
I am a guest and not a member of the MIT Computer Science and Artificial Intelligence Laboratory.
My actions and comments do not reflect in any way on MIT.

  Topological Computer Graphics

 agj @ alum.mit.edu
 Go Figure!
