# Algorithms for generating brick walls

I'm not sure which StackExchange community is the correct place to ask this so I'm trying this one.

I want to write a code that generates random brick wall type textures. Similarly to what, for example, this commercial software does: http://www.vizpark.com/shop/walls-and-tiles/ .

So far I've thought at least three types of brick wall textures I would like to generate: 1) Periodic and user-defined pattern with one or more predefined brick types (bricks can be different shape an size). This is the simplest case. 2) Completely random pattern with predefined brick types 3) Completely random pattern with random sized bricks.

This is pretty much a mathematical problem that could be rephrased as: what is the way to fill a predefined area with certain shapes (either random or predefined) without leaving gaps?

I would assume that people have thought about this type or problems before, but I don't know how to search for it. I'm not looking for a conclusive answer, but would appreciate links to articles, etc. discussing different variations of this or related problems.

• 'what is the way to fill a predefined area with certain shapes (either random or predefined) without leaving gaps?' First, this looks like a much more general question than creating a 'randomized' brick wall. Assuming you do not want to rotate the bricks, you only have to decide on the order of bricks of certain shapes and sizes per layer, which means that the problem is. – Discrete lizard Mar 18 '17 at 9:04
• Second, selecting a random pattern is very simple. You should clarify what you mean with 'completely random pattern'. Perhaps you mean a 'non-periodic' pattern, such as the Penrose tiling – Discrete lizard Mar 18 '17 at 9:09
• Yes, I meant nonperiodic. As for shapes and rotations of the bricks, I would first think about just rectangle shaped bricks (with varying widths and heights), all without rotations, but maybe it would also be interesting to consider more general shapes and rotations. – Echows Mar 18 '17 at 10:59