Skip to content
Daniel Shiffman edited this page Mar 15, 2017 · 72 revisions
  1. Sign up for the class mailing list.
  2. If you would like to join the "coding train" slack group where I have a #natureofcode channel, let me know via e-mail.
  3. You should have received an invite to the Google Drive.

In class examples

Review + Preview

Exercise "brain teasers"

  • Chapter 1: Can you think of 3 different ways to use noise() or randomGaussian() to affect the movement of the Random Walker?
  • Chapter 2: Take one of the motion101_acceleration examples in the Chapter 1, can you draw a vector diagram that represents all of the vector math that’s happening in 1 frame of animation?

Creative Assignment Ideas / Suggestions

  1. Develop a program that experiments with motion.

    • Create a random walker with dynamic probabilities. For example, can you give it a 50% chance of moving in the direction of the mouse?
    • Gaussian random walk is defined as one in which the step size (how far the object moves in a given direction) is generated with a normal distribution. Implement this variation of our random walk.
    • Try implementing a self-avoiding walk.
    • Try implement the random walk known as a Levy Flight.
    • Try a walk in 3D, for example: http://en.wikipedia.org/wiki/Quantum_Cloud.
    • Rewrite your Walker objects with vectors. What happens if you make an array of them, adding new ones wherever you click the mouse.
    • Use the random walker as a template to simulate some real-world "natural" motion. Can you develop a set of rules for simulating that behavior? Ideas: nervous fly, hopping bunny, slithering snake, etc. Consider the challenge of using minimal visual design, i.e. black and white primitive shapes. Can you give your "being" a personality? Can it express emotions -- happiness, sadness, fear?
  2. Apply the rules of motion to another medium of expression: sound, color, number, scale...

    • Walk through RGB or HSB space (as opposed to XYZ)
    • Walk through Pan, Amplitude, Pitch (as opposed to XYZ)
    • Plot an "orchestra" of instruments on an XY plane and move a melody through it like: Rite of Spring or Bolero
    • Create a constantly morphing creature shape using createShape() and vertex(). Play with how you change the number of vertices, anchor points. Make use of vector math to change the length and angle of the segments of the shape.
  3. There are also more exercises in The Nature of Code Introduction.

Directions

  • Document your work on the web and link to it below.
  • If you are using Processing or some other offline tool, add a copy of your work to our shared Google Drive folder. If you are using the p5.js web editor or other online editor like codepen, you do not need to share your code this way.
  • Try to post by the evening before class if at all possible.
  • Add any questions below:

Questions

  • your question here -- your name (optional)
    • an answer will appear here
  • Is there any other way to clear an image without using clear();? I.E. Can I clear an image while still having my walker appear on the screen?
    • For the walker answer to this is createGraphics() or storing all the points in an array, I'll discuss more in class! - Dan
  • how can I export my homework in Processing as video to upload to my blog (sorry if it's a very basic question!) -- Pilar

Post your work - Wednesday Section!

Post your work - Tuesday Section!