Plasma is a very simple effect to perform. The only thing you need is a couple of sine and cosine functions to generate 2D waves, that when using a upcounting angle will seem to move and even makes the different waves combine at some points. A simple way to create a two-dimensional plasma-map is as follows (C++ pseudo-code):
Now you have calculated a plasma-map. Oh yeah, those strange float values, those are just some values i thought of while writing this In fact, the whole routine was just made up by me, while writing this )
To make this plasma move (very kewl effect),
just add an upcounting angle to x and y, while calculating the waves, like:
WHILE NOT DONE, GOTO LOOP
Of course the 256/2/PI should be a precalculated value and you could even generate a sine and cosine list and use a displacement value in the list to make the plasma move, like this:
Just some code-fragments (again made up while writing this ) and i think you got my point.
Btw, in OpenGL, you can use the texture matrix stack to add a plasma effect to a texture you’ve applied to a cube. You could just use the glTranslatef() function to distort the texture coordinates.
Hope you understood all, but i think you can experiment with this all. Just go and experiment with different cosine and sine waves to generate interesting patterns.
Have fun and mail me if you still don’t understand it all.