Take a look at the example below:
It draws this image:
Here, we define our own method called
shape(float x, float y);. It is a method that takes two parameters (x and y coordinates) and draws a shape relative to those coordinates. The catch is that with pushMatrix and popMatrix you can work with relative coordinates inside the shape-method. You can create a very complex pattern with the shape function and then just call shape function over and over again to create complex repetitive patterns.
The example below can give you some ideas. Try to edit the patterns inside shape-method to create something unique.