Problem 1 – using Python to create tessellations
In this section, we are going to provide an example of using the pycairo library for Python. We are going to create a tessellation – more specifically, a sample of Penrose tiling. Because this is a straightforward problem, we are going to define our parameters using the computational thinking process, but not adhere to it precisely.
First, let’s talk about using pycairo pip install to add the necessary components. The pycairo package is a graphics library that works with Python. For more information, you can visit their web page: https://cairographics.org/pycairo.
Now, let’s define some things. A tessellation is a tiling that uses shapes that do not overlap to create patterns. Tessellations are often explored in geometry courses. For our example, we will create a Penrose tiling pattern using two triangles. We will also define our space and the number of sub-divisions we want the shapes to undergo. The...