# Tiling squares on the plane, methods

1. Jul 4, 2008

### Coin

Hm, is this the right place to ask this? It's kind of a topology question, I guess.

Let's say I've got a square. It's got four sides.

Code (Text):

______
|  1  |
|2   3|
|  4  |
------

And I want to tile this over and over on the plane.
Code (Text):

________________________
|  1  |  1  |  1  |  1  |
|2   3|2   3|2   3|2   3|
|  4  |  4  |  4  |  4  |
------------------------

But! Sometimes, as I place the tiles, I want them to rotate.

Code (Text):

________________________
|  1  |  2  |  1  |  1  |
|2   3|4   1|2   3|4   1|
|  4  |  3  |  4  |  3  |
------------------------

If you think about it, both of these tilings are defined by "identifying" sides. In the first, normal tiling, I identified the following sides:
(2,3)
(1,4)

In the second, rotated tiling, I identified:
(1,2)
(3,4)

Here (1, 2) being "identified" means that if you go off the edge of side 1, you'll find yourself just on the other side of side 2.

This all make sense?

So, here's my problem:

I'm doing this in a computer program. And once I've chosen the side identifications, I want to draw the tiling on the screen. So every time I draw a tile, I have a tile coordinate, say, [0,0] or [3,4]-- [3,4] meaning, like, the third tile over on the x axis and the fourth tile up on the y axis. If that makes sense?

So given only that coordinate, I need to figure out: This tile I'm about to draw, what amount of rotation does it have?

In other words, I need some procedure for calculating the function
R(x,y)
Where R returns, for the tile at the coordinate x,y, is it rotated 0, 90, 180, or 270 degrees?

So my second tiling above would look like:

Code (Text):

T(0,0) T(0,1) T(0,2) T(0,3)
0      90     0      90
___________________________
|  1  ||  2  ||  1  ||  1  |
|2   3||4   1||2   3||4   1|
|  4  ||  3  ||  4  ||  3  |
---------------------------

---

...It actually gets worse. Once I have this worked out, I have to figure out what happens if I add reflections-- I.E. with reflections a set of identfications might be
(2,3)T
(1,4)
...T for twisted, such that the tiling looks like:

Code (Text):

________________________
|  1  |  4  |  1  |  4  |
|2   3|2   3|2   3|2   3|
|  4  |  1  |  4  |  1  |
------------------------

---

Does the question I'm asking make sense, and does anyone have any insight on this? It seems like this ought to be a problem that someone, somewhere has had to solve before.

The annoying thing about this problem is that if I needed the reverse of what I need, that would be easy-- if I had the function R(x,y) I could easily calculate the (1,3)+(2,4) mappings from it, by just querying R(0,0), R(1,0), R(1,1), etc until I had all the sides accounted for. But going the other way around seems difficult or at least very nonobvious.

Last edited: Jul 4, 2008
2. Jul 4, 2008

### Hurkyl

Staff Emeritus
I suspect you can get your answer simply by setting up a (family of) recursive equation(s), and then solving it (them).

3. Jul 4, 2008

### Coin

Hm, I'm sorry but I'm afraid I'm not really sure what "recursive equations" means in this case? The only examples of "recursive equations" I can think of would involve something transforming over time, which isn't at all happening here... hm.