Java Demo-- Sparks

You need a Java-enabled browser to view this applet.

Here's another example of how cool real physics looks-- we start off with 10 spark generators, which bounce around and rotate. Each sparker throws off sparks in 3 directions, and recoils slightly in the opposite direction. The sparks stick around for 30 frames, and disappear; all the while falling and bouncing off the sides. Each spark is just one pixel, and instead of erasing the whole screen for each frame, we can just erase the few pixels we've used.

It's odd how our brains tend to relate any pattern or movement we see to something we already know-- I see these objects as some sort of 3-tentacled jellyfish.

Particle animation is a much-underused technique. It can simulate fog, smoke, fire, dust, fluid, and other things fluid and fuzzy; but can have clear, well-deliniated structure, too.

Link to the source code.


Back to Demo List.