Gravity in processing




I was mucking about with processing a little while ago and made a little gravity simulator. The basic particle interactions can be seen here. Most people using processing don’t seem to use it to produce animations like this, but instead use various techniques (mainly alpha-blending) to construct procedural images. My colleague Mitchell Whitelaw has some examples of basic explosion modelling on his web site.

My example depicts particle mass as size, and velocity as colour. If you render the particles with a low alpha and don’t clear the screen between updates, you get this.

Create a free edublog to get your own comment avatar (and more!)

No comments yet. Be the first.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image