code from class 11

 

 

here’s the box2d code — box2d   be sure to add the box2d addon to the addons folder.

most of this is from this github:

https://github.com/vanderlin/ofxBox2d

but the red folders are things I’ve added, including getting box2d to work with a vector field and also, hooking up box2d to live video. (using triangulation)

 

 

 

 

example of getting good points for letters:  letters

here’s letter form + springs (simple experiment) algo_wk10_springs_letters

code from class 10

 

code from class 10  (object oriented approaches, noise, flocking ) algo_wk10

code from week 9

 

here’s spring code from wk9

homework 6

Take some time and get familiar with soda constructor:

http://en.wikipedia.org/wiki/Soda_Constructor
http://sodaplay.com/creators/soda/items/constructor
http://www.cs4fn.org/alife/starterfor10.html

make a creature.

In code, try to make experiments using vector fields and particle particle interaction.

a) try to model a natural phenomenon, such as smoke, water, waterfalls, puddles, etc. What interesting combinations of forces can you come up with?

b) try to create a game using particle particle interaction or vector fields.

c) design something that affords interaction w/ out using a keyboard and mouse, think about computer vision, sound input or other ways of getting human / gestural input into the system.   Think about leaving the screen.  Carefully document your experiments.

advanced:

working alone or in a group, can you design an algorithm for FASTER particle particle interaction?  It must run at 30 FPS in realtime.  Think about how spatial division can help, and how simple things, like sorting can be very effective.  I am very happy to help with this.

all the particles now all repel or attract each other with the same radius. Can you make them have different radii, and still get attraction and repulsion working?   Can you visualize all the forces that are operating per frame?  ie, which particles are within range of each other.  Finally, can you make the particle particle interaction fast (see the second example from class)?

code from class 8

 

 

 

here’s code for week 8 :  wk8

week 7 code

 

 

 

here’s code from week 7:  wk7

wk 6 / 7 code

 

 

 

 

forces on particles, and vector fields:   wk6

homework 5

Non code:

take a video of “real world particles”

see for example, http://vimeo.com/28732551

Code:

(a) create a looping fireworks animation (non interactive). You will need to reset or restart particles every so often.
(and then we’ll figure out how to save this as a screen saver for your mom!)

(b) since you know how to position things in a circle using the formula:
x = x_orig + radius * cos (angle);
y = y_orig + radius * sin (angle);
think about how you could use sinusoidal information to start all the particles with some interesting positions / velocities. Instead of using random, use sinusoidal information (in any way you want) to make the starting positions/velocities of these objects interesting.  can you use sin/cos to make the movement or drawing of the particle more interesting?

(c) Besides evidence to the contrary, particles don’t have to be just circles!  you can draw them however you want.  Can you create an interesting effect with transparency or by using images?   Can you use parameters, like velocity to control the way these objects are drawn (like, they get smaller as they slow down, or more transparent, using angle of the velocity to rotate, etc).  Think about trying to create a natural phenomenon or make something really nice looking.

advanced:

(d) hook up the drawing code (from the lissajous example) to a particle so that the particle draws a trail of where it has been. see if you can make this trail fade out (like a comet) : ) Use alpha or some other method…

(e) Make a funky, expressive drawing tool with particles.

(f) make a ball droppings clone (see josh nimoy’s version http://balldroppings.com/)

code from class 5

 

 

 

 

here’s particle code we covered in week 5:  wk_5