Oh no more Processing!

I was discussing Flight404‘s flow field simulation experiments with Roxlu yesterday and I realised that I’d never actually tried to recreate the effect myself. I’ve played around with stuff that was inspired by these works, but never really been that satisfied with the results. So I thought I should just borrow the idea wholesale and see what came out. The result is this:


(click on the picture to run the demo)

The effect shows 30,000 particles. Each one affected by a number of forces. The forces can either attract or repel and they can also exert an optional rotational force. Every frame the forces from each source are added to each particle’s velocity. The forces have a fixed area of influence (or range) and particles that lie outside that area are unaffected. There is also a fall-off so that particles are affected more strongly when they are closer the force’s origin. Next the velocity is damped (to simulate friction), capped (to stop them going too fast) and then added to the particle’s position. A line is then draw between the particle’s new and old position. Then we do it all again..

There are several different scenes in the demo. You can use keys 1 to 6 to select them, or just leave the thing alone and let it cycle through them randomly.

If you’re interested in how it works then you can grab the Processing source code from the demo page. Or take a look a Flight404’s original description.

This entry was posted in Computers, Development. Bookmark the permalink.

1 Response to Oh no more Processing!

  1. HoTWire says:

    I just picked up processing again this week,.. finally found the blend method on images, so now I can make some of the stuff I’ve been meaning to try out :)

    In other news : Lazy Sunday Radio seems to have gone on ice at the moment, but it’ll pop back up again :)

Leave a Reply

Your email address will not be published. Required fields are marked *