Sie sind auf Seite 1von 8

ARTICLE IN PRESS

Computers & Graphics 31 (2007) 516–523


www.elsevier.com/locate/cag
Chaos and Graphics
The Droste effect image transformation
Jos Leys
Delvauxstraat 34, 2620 Hemiksem, Belgium

Abstract

An image transformation method, first used by the artist M.C. Escher, and described mathematically by H. W.
Lenstra and B. de Smit, is generalized for use in a graphics program. The transformation renders an endless repetition
of a picture in a picture.
r 2007 Elsevier Ltd. All rights reserved.

Keywords: Image transformation; Escher; Endless zoom movie

In 1956, Maurits Cornelis Escher completed a The transformation consists of three stages, which will
drawing called ‘‘Print Gallery’’ (Fig. 1). The drawing be described as follows:
depicts a young man looking at a print in a gallery that Stage 1: Logarithmic transformation
is deformed almost beyond recognition. There is an The transformation zj-ln z will transform the com-
enigmatic white area in the center of the image. In 2003, plex plane into a strip running from N to +N along
a group of mathematicians at Leiden University, led by the real axis with a width equal to 2p: Any point on the
Prof. Hendrik Lenstra, succeeded in unraveling the complex plane can be represented as z ¼ reiy, so
mathematical structure of the image [1]. Once this ln z ¼ ln r+iy. As 0pyp2p, all points will be trans-
structure was known, they could ‘complete’ the image by formed to a strip of width 2p.
filling in the famous white spot with the help of a However as reiy ¼ rei(y+2pn), for any integer n, any
computer algorithm. In doing so, they found that the parallel strip between n2p and (n+1)2p can be
drawing repeats itself indefinitely at an ever smaller considered as an image of the complex plane: in other
scale. This is called the ‘‘Droste effect’’, after an words, ln z will transform the complex plane into an
advertisement for cocoa from the Droste chocolate infinite number of copies.
company in the Netherlands (Fig. 2). The nurse in the For our image transformation, let us consider how
image holds a package on which there is the same nurse ln z transforms the area between a set of concentric
holding a package, and so on. A summary of Lenstra’s circles of radius r1 and r2. The transformation illustrated
method was published in a paper [2], and received a lot in Figs. 3 and 4 is the transformation zj-ln(z/r1). The
of acclaim, not only in academic circles, but also in the outer circle becomes a vertical line at ln(r2/r1), and the
general press. inner circle is transformed to a vertical line at zero: we
In this article I will show how Lenstra’s method can have cut the disc of Fig. 3 along line A0 –A, and bent it
be applied more generally for the transformation of into a rectangle.
images, as well as the generation of endless zoom Stage 2: Rotation and scaling
(progressive magnification) animations. The rectangle in Fig. 4 is now rotated so that its
diagonal coincides with the imaginary axis, and the
E-mail address: jos.leys@pandora.be. rectangle is shrunk so that the diagonal is equal to 2p.

0097-8493/$ - see front matter r 2007 Elsevier Ltd. All rights reserved.
doi:10.1016/j.cag.2006.12.001
ARTICLE IN PRESS
J. Leys / Computers & Graphics 31 (2007) 516–523 517

Fig. 1. M.C. Escher’s ‘‘Print Gallery’’ (r 2006 The M.C.


Escher Company, the Netherlands. All rights reserved. Used by
permission.)

Fig. 3. Concentric circles.

Fig. 4. Circles transformed by ln z.

Fig. 6. All the sides of the rectangle of Fig. 5 are


transformed into spirals. Notice that points A and A0
now coincide, as they were transformed from 2p  i and
Fig. 2. The Droste effect.
0 respectively, which both transform to 1. This
concludes the basic transform.
In transformation terms, this is equal to zj-zfeia, with Combining all stages, the transformation becomes
a ¼ tan1 ðlnðr2 =r1 Þ=2pÞ and f ¼ cos a (Fig. 5). zj-(z/r1)b, where b ¼ feia. The original image of two
Stage 3: Exponentiation concentric circles will be transformed into an identical
We will now transform the rectangle of Fig. 5 with image by the transformation zj-z/(r2/r1), so for the
the transformation zj-ez. This produces the image in transformed image, an identical copy is obtained if z is
ARTICLE IN PRESS
518 J. Leys / Computers & Graphics 31 (2007) 516–523

Fig. 5. Rotation and scaling. Fig. 7. Tiling.

Fig. 6. Exponential transformation. Fig. 8. Exponentiation of the tiling.

divided by (r2/r1)b. This means a scaling by j(r2/r1)bj and transformed so that they tile in spiral form in a seamless
a rotation by minus the argument of (r2/r1)b. fashion. All the replicas are self-similar: area ‘E’ in Fig. 8
We now go back to stage 2. We replicate the rectangle can be enlarged and rotated to cover area ‘F’ exactly.
of Fig. 5 so that it tiles the plane, and then do the stage 3 The configuration of stage 2, where the rectangle is
transformation again. Rectangle ‘E’ in Fig. 7 is the rotated and scaled so that the diagonal is vertical, and
original rectangle of Fig. 5, and is transformed by equals 2p is not the only one possible. All possible
stage 3 to the area ‘E’ in Fig. 8. Rectangles ‘G’ and ‘H’ configurations are shown in Fig. 9. If the rotation is 01
will also be transformed to area ‘E’. Rectangle ‘F’ will be or 1801 and the scaling factor equals 1, the transforma-
transformed to area ‘F’ in Fig. 8. We thus obtain an tion will produce an infinite number of concentric copies
infinite number of replicas of the original image, of the original image. In all other cases, the scaling
ARTICLE IN PRESS
J. Leys / Computers & Graphics 31 (2007) 516–523 519

Fig. 9. Possible configurations.

Fig. 11. Image 1, transformed.

Fig. 10. Image 1, original.

equals f ¼ cos a, and the rotation equals a, 1801a,


1801+a, or a. Fig. 12. Image 2, original.
In summary, the transformation logic is as follows:

 Choose r1 and r2 (a slight adaptation is necessary to The transformation was implemented in Ultrafractal
allow circle centers different from the origin). [3], a graphics program that features user-defined algo-
 Calculate a, f, and b. rithms, and some examples are shown in Figs. 10–15.
 Calculate b ln(z/r1) for the area between the circles, The algorithm can be adapted to allow for non-
tile the resulting rectangle, and finally calculate concentric circles, or even non-concentric polygons. The
eb lnðz=r1 Þ for all pixels. area between the two squares in Fig. 16a is transformed
ARTICLE IN PRESS
520 J. Leys / Computers & Graphics 31 (2007) 516–523

Fig. 15. Image 3, transformed.


Fig. 13. Image 2, transformed.

calculate the fixed point of the transformation. CL is the


center of large square; CS is the center of small square; y
is the offset angle between the two squares, and m is the
ratio of the side of the small square vs. the large square.
The fixed point is given by
ðC L  C s Þ
CF ¼ CL þ .
ð1  meiy Þ
The logarithmic transform then takes the form
ln((zCF)/a) with a ¼ the shortest distance from CF to
the edge of the small square. The overall transform
becomes z ! ððz  C F Þ=aÞb , where b ¼ feia, with f ¼
2p cosðaÞ=ð2p  yÞ and a ¼ tan1 ðlnðmÞ=2pÞ.
An identical copy is achieved through a scaling and
rotation by the absolute value and the argument of
iðafÞ
mf = cosðfÞe , with f ¼ tan1 ðy= lnðmÞÞ.
The procedure is similar for rectangles, or other
polygons. Figs. 18–21 show some examples. One can
zoom in or out on the transformed images indefinitely.
The value of b can be calculated from the size ratio of
the small image vs. the large, and this allows to calculate
Fig. 14. Image 3, original.
the magnification and rotation needed to obtain an
image that is identical to the start image. A limited
number of frames thus suffices to obtain and endless
by the logarithmic transformation into the shaded area zoom movie, provided the video file is shown in loop
in Fig. 16b. This area is then tiled taking into account mode. Fig. 22 shows frames from such a zoom movie (a
the angle offset between the two squares. After ‘‘Droste effect’’ movie), based on a vintage airline
exponentiation, Fig. 16c is obtained. With a rotation poster. More examples can be seen at the author’s
of the tiling after the logarithmic transformation, the website [4].
outcome is Fig. 16d. Professor Lenstra and his team proved that the M.C.
Fig. 17 shows an arrangement whereby the smaller Escher Print Gallery image has a ratio r2/r1 ¼ 256. This
square is off-center vs. the large square. We now need to means that the rotation angle for stage 2 is a ¼
ARTICLE IN PRESS

Fig. 16. (a–d) Transformation of concentric squares.

Fig. 17. (a–d) Transformation of non-concentric squares.


ARTICLE IN PRESS
522 J. Leys / Computers & Graphics 31 (2007) 516–523

Fig. 20. Original photo.

Fig. 18. ‘‘LW346’’ by M.C. Escher ‘‘(r 2006 The M.C. Escher
Company, the Netherlands. All rights reserved. Used by
permission.)

Fig. 21. Original photo, transformed.

tan1 ðlnðr2 =r1 Þ=2pÞ or 41.4291, and the scale factor


f ¼ cos a or 0.749767.
With b ¼ feia, j(r2/r1)bj ¼ 22.5836, and the argument
of (r2/r1)b is 157.625591, so an identical image is
obtained by zooming by a factor of 22.5836 and a
rotation by 157.625591.
It is amazing that M.C. Escher drew his Print Gallery
by intuition, as he was ‘‘untrained in mathematics’’ [5].
Yet, his image is very close to the computer-generated
image, based on the above algorithm. It is also known
that Escher spent a very long time on this drawing, and
it makes one wonder what he could have done with a
computer. On the other hand, no computer-generated
image can match the charm of M. C. Escher’s hand-
Fig. 19. ‘‘LW346’’, transformed. drawn artworks.
ARTICLE IN PRESS
J. Leys / Computers & Graphics 31 (2007) 516–523 523

Fig. 22. (a–e) Frames from a ‘Droste effect’ animation.

References [3] Ultrafractal by Frederik Slijkerman /http://www.ultrafractal.


comS.
[1] Lenstra H, de Smith B. Escher and the Droste effect, [4] Jos Leys, The Droste effect /http://www.josleys.comS.
/http://escherdroste.math.leidenuniv.nl/S. [5] The MacTutor History of Mathematics Archive, School_
[2] de Smit B, Lenstra Jr HW. The mathematical structure of of_Mathematics_and_Statistics, University of St. Andrews,
Escher’s Print Gallery. Notices of the AMS 2003;50(4): Scotland, /http://www-gap.dcs.st-and.ac.uk/history/
446–51 /http://www.ams.org/notices/200304/fea-escher.pdfS. Mathematicians/Escher.htmlS.

Das könnte Ihnen auch gefallen