Archive for May 22nd, 2009

22
May

Fireworks

Fireowrks programed in processing from KevinW on Vimeo.

First project with Processing

For my first dive into the processing programing language, I decided to make a simple 2D particle system and use it to model fireworks.

This started out as simply getting one particle to bounce around.  I then progressively added features and organized the code.

A lot of my learning came from Robert Hodgin’s examples found on his blog:
flight404.com

I decided to keep things 2D for the first project to make it a bit different from Robert’s and so I would not have to mess with 3D vectors for the first project.  Some great things I learned from his code were using colorMode, his “exist” function structure, and aging particles so they fade out over time.

Other things I learned were:
Additive blending and openGL stuff.
Structuring particles systems with effectors and different types of particles.
Loading, displaying, and modifying images.

You may download the source below.

Controls:
Keys: q, w, e, r, t all launch different fireworks
MouseX: aims the launcher.

fireworks src (zip, 112 Kb)