Skip to content
abhijaigarg edited this page Jan 26, 2015 · 27 revisions

Vectors and Forces (due Mon, Jan 19)

Try incorporating the concept of vectors and forces into a sketch. Here are some ideas:

  • Convert something you did previously to using vectors.
  • Simulate motion 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 with 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?
  • Research a force from physics 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)

Reading and resources:

  • Computational Beauty of Nature: introduction
  • Computational Beauty of Nature: Chapter 16
  • Nature of Code Chapter 1
  • Nature of Code Chapter 2
  • If you want to use a physics engine like box2d or toxiclibs I would suggest reading Chapter 5 as well.
  • You might want to look ahead nature of code chapters 6 - 9 as well. We'll be going over this material on Monday.
  • There are also the Nature of Code videos if you prefer this over reading.

Links to sketch and blog post:

Clone this wiki locally