If you find any of this useful, please consider donating via PayPal to help keep this site going.

# More on Tiling Rectangles

8/15/17

Say you have a large image that you need rendered. It might be advantageous to you to split up that image and have each "tile" rendered on a different machine. Afterwards, you'd just have to stitch the parts back together. I helped my brother with the math for this, and wrote Tiling a Square about it.

However, what if instead of tiling a square with smaller squares, we tile a rectangle with squares?

Consider a 345x150 rectangle. What is the largest square tile that we could use to tile the entire rectangle exactly?

The answer is one of the oldest algorithms there is, Euclid's divisor algorithm. This finds the greatest common factor between numbers A and B.

See this calculator. Put in 345 for Value1 and 150 for Value2. The algorithm gives 15. Put another way, the greatest common factor between 345 and 150 is 15, or gcf(345,150)=15.

So a 15x15 square is the largest square that would tile a 345 by 150 rectangle exactly. You'd have 345/15 = 23 of the 15x15 squares in each row and 150/15 = 10 of the 15x15 squares in each column.