Week 9 : Functions: Modularity and Abstraction

Homework

Coding Sketch #6: Functions

Create a p5 sketch in which you compose *your own* function.

requirements

  1. contain drawing commands for a 2D complex form (a visual figure comprised of 2 or more 2D primitives, such as the robots or the owls in the text). It could be a tree or bush, a spaceship, two intertwined funky squiggles, a skyscraper
  2. Select *at least two aspects* of that drawing to modify with the random() function. These aspects should passed to the function as parameters. Call this function more than 4 times in order to create a group effect (a tree becomes a forest, a skyscraper becomes a skyline, a spaceship becomes a fleet of nice, friendly aliens coming to a picnic).
  3. BONUS. Use a for loop to call your function many (!) times.

Readings

Card image cap
Make: Getting Started with p5*js

Chapters 7. Motion

by

LINK

Examples

Other Materials

Key Concepts:
Coding Components: