Level 2 – Concept 11 Exercises

Coding Exercise 1

Prerequisite Concepts 6, 7, & 10
Key Concept 11

Native Americans use border patterns, having spiritual significance, in the designs of rugs, pottery and jewelry. Different tribes use different border patterns. These patterns can be used to identify tribal influences in artwork. The Hopi construct border patterns involving spirals which represent the cycle of life. Examples of these patterns in bracelets are shown below. 

Use nullary function declaration(s) to define one or more spiral patterns. Then use offsets to create a repeating pattern involving the spiral patterns defined in your nullary functions.

Before building this artifact it is recommended that you complete all Vitruvia exercises for Concept 11.


Coding Exercise 2

Prerequisite Concepts 6, 7, & 10
Key Concept 11

The flag of Indonesia consists of a red and white horizontal stripe. It is modeled after 13th century banner of the Indonesian Empire. Use nullary function declarations to dene a small and large Indonesian flag. Then use offsets to create the artifact shown below.

Before building this artifact it is recommended that you complete all Vitruvia exercises for Concept 11.

11_02


Coding Exercise 3

Prerequisite Concepts 6, 7, & 10
Key Concept 11

The logo for Microsoft’s Windows operating system has changed over the years. For many versions of the operating system, the logo was based on a 2×2 checkerboard whose squares were red, green, blue and yellow.

Use a nullary function declaration to dene a Windows logo having a black border. Then use offsets to create the LEGO artifact shown below.

Before building this artifact it is recommended that you complete all Vitruvia exercises for Concept 11.

windows_logo

11_03


Coding Exercise 4

Prerequisite Concepts 6, 7, & 10
Key Concept 11

Ole Kirk Christiansen a carpenter from Billund, Denmark, invented LEGO. Today, the company that makes LEGO is called The LEGO Group and is headquartered in Billund, Denmark. The flag of Denmark consists of a white Scandinavian cross on a red background. A LEGO version of this flag is shown in Figure 1.

11_04_a
Figure 1: Flag of Denmark in LEGO.

Create a nullary function, called flag, that builds the LEGO artifact shown in Figure 2. Next create a nullary function, called flagOfFlags, whose body contains four calls to the function flag. The body of flagOfFlags should also make use of offset functions (i.e., incOffset2D, decOffset2D, or setOffset2D) to properly position each flag. When called, the function flagOfFlags should produce the LEGO artifact shown in Figure 2. Note that there are 2 blank cells between each of the flags.

11_04_bFigure 2: Flag of Flags of Denmark.

Now create a nullary function, called flagOfFlagsOfFlags, that builds the LEGO artifact shown in Figure 3. The body of flagOfFlagsOfFlags should contain four calls to the function flagOfFlags and should used offset functions to properly position each cluster of four flags. Note, that setOffset2D is the easiest way to position each of the clusters. However, try to also see if you can figure out how build the LEGO artifact shown in Figure 3 using only incOffset2D function calls. Note that the spacing between flag clusters is now 4.

11_04_c
Figure 3: Flag of Flags of Flags of Denmark.

Can you repeat this algorithm one more time to produce the LEGO artifact shown in Figure 4? Note that the spacing between flag-of-flag clusters is now 8.

11_04_d
Figure 4: A giant flag pattern.