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
- We will review the selfies in code that you made for your homework.
- 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.”
- 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
- 80/100 - Student shared links to their p5js sketches and is present during class to explain their process and ask / answer questions
- 20/100 - Student offered feedback to fellow students publicly in the Slack
Homework
- 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.
- Be prepared to share your looping designs with the class on Slack next week.
- Watch the lecture video for Week 5 on Functions, Classes, and Typography.
Homework Rubric
- 80 / 100 - Student used p5js to design a pattern for gift wrapping paper.
- 20 / 100 - Student submits the link to their p5js sketch to Slack on time before the next class.
back