Escher Tiles

The artist M. C. Escher is famous for, among other things, his marvelous tilings.

In this section, we will build a Javascript program that allows the user to make tiles that are reminiscent of those done by Escher.

A sample tiling

The finished product can be seen here.

The program needs some instructions to use:

You start by grabbing one of the red lines, and moving it. As you do this, you can see all of the tiles change their shape to match. Each time you grab a line segment, it splits into two, and you drag the vertex of those two lines. You can also grab a vertex and move it, if you don't like where you first put it (the mouse cursor changes to a pointing finger when it is over a vertex).

When you like the shape of your tiles, click on the button down in the toolbar to switch to paint mode.

In paint mode, you can change the color of the brush, and the size of the brush. As you paint, notice that the brush paints all of the tiles at once.