Week 9 : Functions: Modularity and Abstraction
Homework
Coding Sketch #6: Functions
Create a p5 sketch in which you compose *your own* function.
requirements
- 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
- 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).
- BONUS. Use a for loop to call your function many (!) times.
Readings
Make: Getting Started with p5*js
Chapters 7. Motion
by
LINK
Examples
Other Materials