Skip to content
lastie edited this page Jan 14, 2015 · 38 revisions
  1. If object-oriented programming is new to you, read Chapter 8 of Learning Processing or the shorter Processing OOP tutorial. This will help prepare you for tomorrow's discussion on objects in JavaScript.
  2. We're going to look at Perlin Noise in class soon. For a head start read and to think about objects more read the Nature of Code Introduction.
  3. For more on fractals and recursion read Chapter 8 from 8.1 - 8.3.
  4. Create a p5.js sketch that involves interaction with conditionals and/or functions. You can use one of the ideas below or invent your own assignment.
  • As an exercise, try making a rollover, button, or slider from scratch. Compare your code to the examples on github. This is something of a silly exercise because as we briefly saw in class we can get all these interface elements for free with HTML. Still this is an opportunity to practice conditional statements and well as invent new GUI elements beyond buttons, sliders, rollovers, etc.
  • Take the idea for a design and break it out into its own function. Add parameters to the function so the design can be drawn differently based on the selected parameters. Draw three or more instances of the design on the screen to show the differences possible by changing the parameters. Here is the example demonstrated in class
  • Create a design from a recursive function. How could you animate or change this design over time? Can you make it interactive or have it controlled by noise()? Here are some samples as shown in class.
  1. Document the process of creating your homework in a blog post. What were you inspired by? What pitfalls did you run into? What could you not figure out how to do? What are your next steps?
  2. Contribute any questions below.

Questions

  • your question here

Nkosi- How do you make a nested loop in p5.js?

Add Link Your Homework

Clone this wiki locally