virtual ink marbling http://swiss.csail.mit.edu/~jaffer/Geometry/Marbling-1

Mathematical Marbling

marble-dyed fabric 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 vector-valued function F from a plane (R×R) 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 F1 will be the first stroke and Fn will be the last stroke of the sequence:
F = Fn ° Fn-1 ° · · · ° F1
Note that order is important here. The last stroke, Fn, 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.

When an area is dense with folds, any low-degree differentiable function which detours around the lines traced by comb points should render reasonably well for this purpose. In the treatment below it turns out that deformations parallel to infinitely long lines are more tractable than tines which start and stop. To avoid dragging the lines to infinity we set a maximum displacement z for the deformation each tine introduces.

Inks

At the start of the real marbling process, inks are dropped from one or more locations to form expanding rings on a denser liquid substrate. In my first renderings, 5 virtual inks are dropped from the center to form 25 concentric rings of equal thickness.

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 (xy) coordinate in the ink-circle plane is mapped to Fv(xy):
Fv(xy) =  ( x, y + z · c
| x - xL | + c
)

Fv displaces each point vertically by an amount inversely proportional to its horizontal distance from the tine's x-coordinate xL.

Parameters

The scalars z and c control the maximum displacement and sharpness of the bends, respectively. Varying the values of z and c makes little difference to the character of the marbling; which lends support to the claim of topological rendering.

The transform for straight, horizontal strokes is to displace each point horizontally by an amount inversely proportional to its vertical distance from the tine's y-coordinate yL:
Fh(xy) =  ( z · c
| y - yL | + c
+ 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) undid each other, the next combing sequence to try was a commutator. Where operators do not commute, composing operators and their inverses in an asymmetrical sequence often reveals quintessential properties of their mathematical interactions.

The image to the right is the result of straight combings (10 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, North, then East. Although the depth of combing was the same as the previous picture, here the circularity of the initial inks is evident.

The parallel displacements with unlimited extent do not shrink or grow regions of the plane, just shear them. So the linear strokes are compatible with the (liquid) inks being incompressible.

Generalizations

This calculation can be extended to lines with arbitrary slope. If L is the tine-line, 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:
d = | (P - B) · N |
Given M, the unit vector in the direction of the tine line L, the (vector) mapping for point P is:
FL(P) =  P + z · c
d + c
· M


Circular tine tracks are also compatible with incompressible flow. In this case points are displaced along arcs around a center point C.
d = | ||P - C|| - r |
The length l of the displacement arc, and its angle a subtended at C are:
l = z · c
d + c
      a = l
|| P - C ||
The point P is thus mapped to:
FC(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.

Now that we have mastered the basics of marbling, the next chapter deals with tine tracks with other than straight or circular trajectories.

Copyright © 2003, 2004, 2007 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!