| http://people.csail.mit.edu/jaffer/Geometry/Marbling-4 |
Marbling the Torus |
Now imagine that tube stretched and rolled so that its top and bottom
circles meet. As before, to look continuous the colors and boundary
lines must match.
This is the torus. To
a 2-dimensional observer in the torus surface, the universe looks
infinite, but repetitive; looking directly north or south multiple
copies of each feature are evenly spaced; looking directly east or west
the copies of each feature are evenly spaced -- but not necessarily with
the same spacing as appears north-south.
Many of the deformations discussed so far are not well-defined on the torus.
|
∑
j |
z · c
| x - xL+ j · r | + c |
But this sum does not converge. We would need displacement functions with exponents of | x - xL+ j · r | larger than 1.
At this point it is worth rethinking strategy. We can do quite a bit
of marbling using just horizontal and vertical strokes and sinusoidal
(or other) parallel displacements. The good news is that horizontal
and vertical displacments work in the torus.
A given point always lies in one half-open interval between a straight
stroke and one of its (parallel) images. Instead of summing the
contributions from every stroke image, sum only the contributions from
these two closest lines.
Because the contributions are symmetrical to both sides of the stroke, it doesn't matter which side of the interval is half-open (when the point lies on the stroke).
/fmod % real modulus --> real
{
/X2 exch def /X1 exch def
X1 X2 X1 X2 div floor mul sub
} bind def
Because the repeat lengths xrep and yrep may be different, I returned to using separate routines for horizontal and vertical strokes.
/Vertical % px py xc dy --> px py
{ /dy exch def
/xc exch def
/py exch def /px exch def
/a xc px sub dy mul abs c add z.c exch div
xc xrep px xc lt {sub} {add} ifelse
px sub dy mul abs c add z.c exch div add def
px py dy a mul add yrep fmod
} bind def
/Horizontal % px py yc dx --> px py
{ /dx exch def
/yc exch def
/py exch def /px exch def
/a yc py sub dx mul abs c add z.c exch div
yc yrep py yc lt {sub} {add} ifelse
py sub dx mul abs c add z.c exch div add def
px dx a mul add xrep fmod py
} bind def
/Up {-1 Vertical} bind def
/Down {1 Vertical} bind def
/Left {1 Horizontal} bind def
/Right {-1 Horizontal} bind def
The resulting bouquet image can tile the plane with perfect continuity
across seams.
A monochrome version of this pattern is the background for these pages.
[image is linked to bouquet tiling]
|
|
|
|
|
|---|
The next chapter explores application for
these designs.
|
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! | |