| http://people.csail.mit.edu/jaffer/Marbling/Torus |
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.
Since each feature appears infinitely many times, the total displacement will be an infinite sum. A given point always lies in one half-open interval between a straight stroke and one of its (parallel) images. Without loss of generality, assume that a point at (x,y) lies to the right of a vertical stroke (at xL). The sum of displacements due to the stroke and its images (spaced by rx) to the left side is:
|
∑ j | z·ux−xL+j·rx = | z·ux−xL |
∞ ∑ j=0 | (urx)j = |
z·ux−xL
1−urx |
|
∑ j | z·urx+xL−x+j·rx = | z·urx+xL−x |
∞ ∑ j=0 | (urx)j = |
z·urx+xL−x
1−urx |
| z |
ux−xL + urx+xL−x
1 − urx |
Because all strokes will be subject to the constant 1/(1−urx) deepening factor, we don't bother to compute it and let the artist control it through z. Thus we need sum only the contributions from the 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 abs u exch exp z mul
px xc lt {xc xrep sub} {xc xrep add} ifelse
px sub abs u exch exp z mul 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 abs u exch exp z mul
py yc lt {yc yrep sub} {yc yrep add} ifelse
py sub abs u exch exp z mul 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 (oversampled) 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 images below are from an earlier version of mathematical marbling (hyperbolic vs. exponential); I can't find a VRML viewer which does image mapping (2010-12).
|
|
|
|
|
|---|
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! | |