-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Applied Computational Thinking with Python
By :
In this section, we are going to provide an example using the cairo library for Python. We are going to create a tessellation, more specifically, a sample of a 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 the cairo library. Once the pip install cairo command is successful, you'll need to perform one more step to include all the components needed. Use pip install pycairo to add the necessary components. The cairo and pycairo packages are graphics libraries that work 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...