Simulation – eat/mate/die

I created a basic “eat/mate/die” simulation in Processing. Creatures wander around the screen looking for food. When they are no longer hungry they begin a mating dance by slowly circling the center of the screen. If they are able to crash into each with sufficient velocity they will mate and reproduce. Eventually the creatures die of old age, or starvation, and become food for the surviving creatures to eat.

[vimeo https://vimeo.com/77563252 w=640]

The movement of the creatures is governed by steering behaviors that I picked up while reading The Nature of Code. Each creatures is pushed and pulled by four internal forces:

  • Hunger pushes creatures toward food.
  • Mating pushes creatures into a circular pattern and is inversely proportional to the hunger force.
  • Separation pushes creature away from each other to prevent overlapping. Separation can be overcome by a strong mating force.
  • Wander pushes creatures to explore the world.

Each creature has a unique name, selected randomly from the Social Security Administration’s list of top 1000 baby names from 1880.

The user is able to zoom in on and follow individual creatures with the space bar. While following a critter you can zoom further in or out using the mouse wheel, select other creatures to follow with j or k, and gently steer using the arrow keys. i reveals all the creature names and statuses, and pauses or resumes the animation.

You can play with it here: http://openprocessing.org/sketch/116939

And download the code here: https://github.com/antiboredom/creatures

Turning a camera into an instrument (of sorts).

I worked with Aaron Arntz to produce this little experiment. The idea is that the camera splits the screen into blocks, then captures color values for each block, and then plays music whenever the colors shift… It’s a bit of a mess right now but it works!

I dealt with image processing and display, and Aaron used the minim library to produce the sounds.

The code’s over on github.

And here’s a video of the project in action:
[vimeo https://vimeo.com/75279998 w=640]

As you can see something went terribly wrong/right with my recording setup…

Prisms

For my second computational media project I worked with Brian Clifton to make this prism extruding thingy. We were inspired by the code we found here.

Click here to see the sketch on openprocessing.org. You can mouse over to extrude the triangles, click them to change their color, or move the slider (or mouse wheel) to change their max height.

Here’s a vid:

[vimeo https://vimeo.com/74787712 w=640]

And here’s the code:

“Make something static”

For our first assignment in Intro to Computational Media, Daniel asked us to play around with shape primitives in Processing and “make something static”.

I started experimenting with shapes and colors and came up with the sun-like sketch below. Note – this isn’t quite static – you can click on the sketch to generate a new, semi-randomized sun. Clicking more to the right will generate more sun rays, and clicking more towards the bottom will alter the background color slightly.


Afterwards I made this goofy hand/recursion thing that really had nothing to do with the assignment (inspired by this work). Move the mouse around to play with scale etc.

Here’s a screenshot of another version:

hand_output 3