Link Search Menu Expand Document

Day 4

Topic Loops

Learning Objectives

With this topic you

  • understand how to repeat code,
  • know how to implement a while and a for-loop,
  • know how to implement a 2D for-loop, and
  • understand how to create grid-based pattern.

Script

Exercise Patterns

2.1. Grid Pattern

Write a sketch that generates a pattern with a similar logic as the 10 PRINT example. You can use the code from the script as basis. Ideally, your pattern should follow an element-by-element and row-by-row iterative creation process - but don’t feel limited be this. If you have other ideas for creating a pattern, go for it! The overall goal is to create a visual pleasing or interesting pattern up to your liking.

Here an example from Rita:

pattern_01

2.1. Interactive Parameters

Make your pattern interactive by mapping at least two changeable visual characteristics to, e.g., the mouse and / or keys.

Submission

Submit your sketches under Exercise - Patterns in the OpenProcessing class.


Topic Arrays

Learning Objectives

With this topic you

  • understand the logic behind arrays, and
  • know how to use them.

Script

I recommend that you go over the confetti example one more time. Make sure that you understand

  • how to fill an array with values,
  • how to access array elements, and
  • overall the connection between the use of arrays and the use of loops.

There is no further exercise specifically in regard to arrays.


Final Project

Think about a possible follow up project one more time. If we have time for it, I would like to hear about your idea in class.

Btw. the final project is not mandatory but highly encouraged!