Post any questions or comments here.
-
Read along in the Nature of Code Chapter 1: Vectors
Post any questions or comments here.
Post any questions or comments here.
Post any questions or comments here.
-
This video covers mag() and normalize() in the PVector class.
-
Read along in the Nature of Code Chapter 1: Vectors
Post any questions or comments here.
Post any questions or comments here.
-
This video discusses the definition of a "force" as well as an overview of Newton’s 3 laws of motion.
-
Read along in the Nature of Code Chapter 2
Post any questions or comments here.
-
This video covers how to apply a force to a moving object in Processing. These forces are "made-up" values and don’t yet involve more complex formulae (coming soon!)
-
Read along: Nature of Code 2.2
Post any questions or comments here.
-
This video shows how to add mass to your object for a simulation with shapes of different sizes.
-
Read along: The Nature of Code 2.4
-
Example 2.3: Forces with mass (also demonstrates "real-world" gravity on earth)
Post any questions or comments here.
-
Read along: The Nature of Code 2.7
Post any questions or comments here.
-
Read along: The Nature of Code 2.8
Post any questions or comments here.
Choose one or create your own. Post your work as a link in the comments below.
-
Rework your motion sketch from week 1 using PVector. Try incorporating the concept of forces into the environment by affecting only the acceleration. Create a formula for calculating a dynamic acceleration, one that changes over time based on any number of factors. What happens if you make more than one object via an array.
-
Using forces, simulate a helium-filled balloon floating upward (and bouncing off the top of a window). Can you add a wind force which changes over time, perhaps according to Perlin noise?
-
Create an example where instead of objects bouncing off the edge of the wall, an invisible force pushes back on the objects to keep them in the window. Can you weight the force according to how far the object is from an edge, i.e. the closer it is, the stronger the force?
-
Create pockets of air resistance / friction in a Processing sketch. Try using circles instead of rectangles, i.e. pockets of mud (or ice). What if you vary the strength (drag / friction coefficient) of each circle? What if you make some of them the opposite of drag—i.e., when you enter a given pocket you actually speed up instead of slow down?
-
Can you create an example where all of the Mover objects are attracted to the mouse, but repel each other? Think about how you need to balance the relative strength of the forces and how to most effectively use distance in your force calculations.
-
Research a force not covered in class and implement it as a vector.
-
Use the concept of forces to visualize some input (could be data, literal example would be get windspeed online and translate to a wind force in Processing, but feel free to think more abstractly)
-
Build a sketch that has both "Movers" and "Attractors". What if you make the Attractors invisible? Can you create a pattern / design from the trails of objects moving around attractors? See the Metropop Denim project by Clayton Cubitt and Tom Carden for an example.
Just as with last week, please create a web page to document your homework. Make sure it include some visual documentation of your work as well as the source code.
Post a link to your homework assignment here.
-
Newtonian Physics, An Online Textbook (This is long, you may find Chapter 4 to be particularly relevant to this week’s discussion.)
-
Mathematics and Physics for Programmers, Chapters 12 and 14, Danny Kodicek (suggested)