Skip to content

tcoxon/droste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

droste

Applies the Droste effect transformation to an image.

The Droste Effect

The Droste effect is a kind of recursive image, first known to appear in M.C. Escher's Print Gallery.

The mathematical description of the Droste effect was not discovered until 2003, by a group of mathematicians at Leiden University, led by Prof. Hendrik Lenstra. The following web page describes how the effect is applied:

Build Instructions

droste doesn't have a real build system at the moment, only a shell script that invokes the compiler. To build, you must have sh and gcc on your path, then:

$ ./build.sh

Usage

$ ./droste image.bmp [--eog] [--logpolar]

Options

  • --eog executes eog (Eye of Gnome) after the image has been created
  • --logpolar creates a partially-transformed image. These options may also be used:
  • --logpolar-rotate
  • --logpolar-repeat
  • --logpolar-rotate-repeat

Description

By default, droste will perform the full Droste effect transformation. If the input image is image.bmp, droste will write the output to image-droste.bmp.

droste supports 24-bit and 32-bit bitmap images. 32-bit bitmaps sort of work, but colors in the output are all wrong. 24-bit is recommended.

The centre pixel defines the color of the transparent area of the image.

Start off with your original image:

Original image

To perform the transformation, a portion of the image needs to be marked as 'transparent'. Fill out an area with a single color (one not used elsewhere in the image) like below, and save the image as a 24-bit bitmap. It works best if the transparent area is small in comparison to the whole image.

Transparent image

droste will first transform the image into log-polar coordinates:

Log-polar coordinates

It will then repeat the image horizontally and rotate it slightly:

Log-polar rotated and repeated

Finally, the image is transformed back into cartesian coordinates, and the Droste transformation is complete:

Droste effect example

About

C program to apply Escher's droste transformation to an image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published