Week 04: Repetition, Decisions and Randomization

We are meeting over Slack this week.

Lecture

This week, we will discuss repetition and patterns in nature and art, and how to replicate them in p5js using for loops. We will also explore making decisions within for loops using if/else statements. Finally, we’ll examine how to incorporate organized randomization and Perlin Noise to introduce random elements into your p5js sketch.

Lecture Slides and extra videos

By the end of the week, please cover these coding examples and functions:

Methods and Functions Discussed

Repetition

Decisions

Randomization

Coding Examples

Helpful Videos

Guest Video

Professor Christopher Hanusa shares his math inspired artwork and talks about the classes he teaches at Queens College in the Math department that are art focused.

In Class Code Examples

In Class

  1. We will review the selfies in code that you made for your homework.
  2. Take the Sol Lewitt description below. Using a for loop and if statements create a design in p5js based on the instructions: “Six white geometric figures (outlines) superimposed on a black wall.”
  3. Share your new creation to the class.

To help you with your classwork, you can check out these resources on Sol Lewitt:

In Class Rubric

Homework

  1. Use p5js to design a pattern for gift wrapping paper. You must use a for loop, if statements, and either the random or noise function.
  2. Be prepared to share your looping designs with the class on Slack next week.
  3. Watch the lecture video for Week 5 on Functions, Classes, and Typography.

Homework Rubric

back