Drawing smoke effects with java

Mad picture Mad · Jun 12, 2011 · Viewed 7.5k times · Source

Is there any way to draw a smoke effect in java (by using Java2D API). I want to achieve this: when a user provides the color for the smoke, the program automatically draws a smoke effect with that color. How could I do this?

Answer

Vineet Reynolds picture Vineet Reynolds · Jun 12, 2011

The terminology used in computer graphics is particle systems, and not smoke effect. After all, you can model smoke by treating it as a collection of several particles.

There are quite a few tutorials that discuss building particle systems in Java. Both of the links listed below have source code:

Related question on Stackoverflow:

  1. 2D smoke/fire/mist algorithm