-
Notifications
You must be signed in to change notification settings - Fork 18
Homework 1
Daniel Shiffman edited this page Mar 15, 2017
·
72 revisions
- Sign up for the class mailing list.
- If you would like to join the "coding train" slack group where I have a #natureofcode channel, let me know via e-mail.
- You should have received an invite to the Google Drive.
- Introduction
- Chapter 1 materials
- Chapter 1: Can you think of 3 different ways to use
noise()
orrandomGaussian()
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?
-
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?
-
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()
andvertex()
. 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.
-
There are also more exercises in The Nature of Code Introduction.
- 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:
- 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
- For the walker answer to this is
- how can I export my homework in Processing as video to upload to my blog (sorry if it's a very basic question!) -- Pilar
- Screen capture or see this video! https://www.youtube.com/watch?v=G2hI9XL6oyk
- Alex - That's So Random
- Anne - Wandering Button
- Corbin - PLEASE PLAY!
- Daniel -documentation and just the thing
- Grau - cat mosaic
- Jinhee - blog
- Diana - Blog
- Manning - Draw me some red silk
- Miao -recreate spiked ball
- Pan -random walker andblog
- Paula - Images walking https://alpha.editor.p5js.org/paulaleonvendagar/sketches/HJUW-e1dg
- Steven - Homework 1
- Mint - Code, Blog
- Xinyu (Shelley) -random walker and literally random walker
- Tong - Random Circle (google drive) and Post Here
- Teresa - Fireworks
- Aaron -
- Ada - Unicorn Feather
- Daniella - http://www.0oda.com/a-certain-chance/
- Danni - https://alpha.editor.p5js.org/dannihuang/sketches/SJ5ob10Px
- Dong Chan - Random Mosaic - Code
- Ji Young -Circular Grid
- Pilar -Firefly lovers
- Michael - randomWalkerLand
- Oriana - https://alpha.editor.p5js.org/Oriana/sketches/rkTHLQADe
- Tiri -noisy line - [noisy line(https://alpha.editor.p5js.org/Tiri/sketches/rkaRgWAwe)
- Utsav - Celestial entities - [Comet code] (https://alpha.editor.p5js.org/utsav/sketches/BJFF1ldux), Galaxy code, Abyss code
- Yun - 3D RandomWalker, [Source Code] (https://codepen.io/YUNNN/pen/EZoMqE?editors=0010) - Animation is not showing
- Yuqiao -cross
- Zhuoxi - Random walker
- Jade - Flung out of space, [Code] (http://alpha.editor.p5js.org/Jade/sketches/Syuhw5awl)
- Yeseul - Different Frequencies