Creating Tessellating Art - with Java

Creating Tessellating Art with Java


To do the tessellation in Java, you must have a system that will support the language, such as Macintosh, Windows NT, Windows 95, or the Sun Operating System.

Here are the steps to use this Java program:

  1. Download the jdk1.1 Sun example by clicking here to download the Windows95/NT version. You will also find the MAC version at this site.

  2. Click here for directions from Sun or follow the directions listed next.

  3. In Windows, click on start, run, and type the path and name of the file. It will install into the correct directories. Or for both Windows and MAC, click on the folder that holds the file and on the file itself. This will install the Java program.

  4. Modify the CLSFractal.java code which is in the c:\jdk1.1\demo\fractal directory.

  5. The only changes that should be made to this demonstration program are a deletion of the paint function and an addition of a new paint function that draws the objects wanted. The following example shows how paint was modified to become a diamond tessellation. Example.

  6. After you have done the above, to compile Java, on a command line compiler type at the dos prompt(C:\>) as follows (remember to press enter after each line):

    • cd jdk1.1\bin
    • javac c:\jdk1.1\demo\fractal\CLSFractal.java

  7. The program is now compiled, type "exit" at the prompt.

  8. To see the program click on example1. Example1

  9. Scroll to the bottom of the tessellation page (example1) to see the whole source code.

Go back to main page.