M.C.Escher "Square Limit" Picture. (Part 0 of 2)

M.S.Parsons msp at ukc.ac.uk
Fri Jul 11 03:08:51 AEST 1986


SQUARE LIMIT
This drawing, created by M. C. Escher, is a highly recursive picture of
intertwined fish. This drawing was first analysed and re-created by Peter 
Henderson.
Following this header are two picture files containing the first two levels
of the drawing. The third level is too big to transmit at present.

REFERENCE
%A Peter Henderson
%D 1982
%J Conference Record of the 1982 ACM Symposium on LISP and Functional Programming
%K Functional Geometry, Functional Graphics, LISP, Escher, Transformations.
%P 179-187
%T Functional Geometry

SOURCE CODE
If anybody wants the source code, they are welcome to it. I have two versions
each written in a purely functional language (KRC/Miranda). The source code is 
small (about 10Kb).

PICTURE FORMAT
The original format for each drawing is simply a list of line specifications,
one per line in the form: x1 y1 x2 y2. To reduce the size of this file, these 
absolute coordinates are converted into relative coordinates. Then the file
is compressed using compress (V4.0). Finally the file is uuencoded. So to 
view the picture: uudecode the picture file, uncompress it, pipe it through
the relative to absolute coordinate filter and display on your favourite
device.

PICTURE SIZE
Bytes
94553  fish1
66278  fish1.r
20090  fish1.r.Z
27703  fish1.r.Z.uu
Number of lines:	5973
Min x and y:		0 0
Max x and y:		1024 1024

Bytes
242470 fish2
164879 fish2.r
51436  fish2.r.Z
70893  fish2.r.Z.uu
Number of lines:	15900
Min x and y:		0 0
Max x and y:		1024 1024

Bytes
699572 fish3
458458 fish3.r
140013 fish3.r.Z
192929 fish3.r.Z.uu
Number of lines:	36924
Min x and y:		0 0
Max x and y:		8192 8192

RELATIVE TO ABSOLUTE COORDINATES
#include <stdio.h>

main()
{
int cx = 0, cy = 0, x1, y1, x2, y2;

	while (scanf("%d %d %d %d\n", &x1, &y1, &x2, &y2) == 4) {
		cx += x1;
		cy += y1;
		printf("%d %d ", cx, cy);
		cx += x2;
		cy += y2;
		printf("%d %d\n", cx, cy);
	}
}

------------------------------------------------------------------------------
Mike Parsons    UUCP: ..!seismo!mcvax!ukc!msp             JANET: msp at uk.ac.ukc
                MAIL: Computing Lab, University of Kent, Canterbury, Kent, UK.



More information about the Comp.sources.unix mailing list