A java applet that can be used to generate patterns and explore symmetry is available for use. In particular, "edge limit" patterns, "center limit" patterns and patterns where the foreground and background are reversible may be generated. Such patterns were made famous by the Dutch artist M. C. Escher.

A quick understanding of the program's capabilities may be obtained by working the short tutorial included in the help file.

The program consists of a Java applet and two supporting PHP scripts.

User Guide

A help file is included with the program. This file describes in detail the capabilities of the program and how to use it.


The java applet is called from an html file (see Patterns.html) using the following code:
<applet code="Patterns.class" archive="Patterns.jar" width=1034 height=804>
<param name=Server value="">
<param name=Directory value="Patterns">
<param name=ReadFile value="pattern">
<param name=WriteFile value="pattern">
The four 'param' lines define the applet options. The value of 'Server' is the address of your server. If you install the program in a subdirectory of your public_html directory, set the value of 'Directory' to that subdirectory otherwise set the value of 'Directory' to "". The program saves patterns in a pattern file. This file contains a special header. For security reasons, the program will not create this file and will only append patterns to an existing file containing this special header. The file is normally called pattern and is created by making a copy of the file called header.

The values of 'ReadFile' and 'WriteFile' should normally be set to the same value pattern. If you wish to edit a pattern file, however, set the value of 'ReadFile' to an existing file and set the value of 'WriteFile' to the name of a new copy of the header file.


To install the program do the following:
  1. Download and unzip it using WinZip. This will provide you with copies of all the files.
  2. Decide on a directory to hold your program. This will typically be your public_html directory or one of its subdirectories.
  3. Edit the Patterns.html file to reflect your needs paying particular attention to the four 'param' lines which define your options.
  4. Upload the 'jar' file, the two php files, all the 'gif' files, all the 'html' files, and the header file to your selected directory.
  5. Make a copy of header and call it pattern (or the value of the WriteFile parameter if you changed this parameter).
  6. Test your program.


The following files are included in


You may examine and try a working example.

Source Code

The Java source code for Patterns together with the source code for the supporting PHP scripts is included in here. The format of the picture file is described here.


  1. The Infinite World of M. C. Escher - Harry N. Abrams, Inc., New York 1984.
  2. An Implementation of the Henderson Picture Language - Lisp: A Language for Stratified Design - By Harold Abelson and Gerald Jay Sussman - Byte February 1988

Other Programs

Please take a look at my Paint Program. and the stand alone version of my Patterns Program.


This program was written by Brian Prentice who may be contacted at

Brian Prentice,
355, So 8th St., #26
Coos Bay OR 97420