Moroccan Mosaic

ZelligeMoroccan mosaic, aka Zellige (الزليج‎‎), is a form of Islamic art and one of the main characteristics of Moroccan architecture. It consists of geometrically patterned mosaics, used to ornament walls, ceilings, fountains, floors, pools and tables. Each mosaic is a tilework made from individually chiseled geometric tiles set into a plaster base.

You can google examples of Zellige using this link.

In this challenge, we will investigate how to create our own mosaic using various geometric patterns. We will use Python Turtle to draw a regular polygon (e.g. pentagon, hexagon, etc.) and repeat and rotate this shape several times to create a circular pattern/mosaic.

Mosaic Code: Using one polygon shape:


Amend the code below by changing the value of the three parameters used by the drawMosaic() function. View the impacts of these changes on your final mosaic.

python-turtle-mosaics-1

Mosaic Code: Combining two polygon shapes:


The code below combines two different types of regular polygons to create a more complex pattern:

python-turtle-mosaics-2

Share Button
Posted in Computer Science, Python - Intermediate, Python Challenges Tagged with: ,

Our Latest Book