Download source code here:
http://vulcanus.its.tudelft.nl/robert/P ... smaSRC.zip
Basic recipy I used for my plasma:
First of all the sine function is your friend
- create a palette (just an array that holds a number of colors). I use sine functions to get a nice looking palette, you need the first and last color to be the same to make the plasma look good.
- make plasma LUTs, what I did is create 2 arrays twice the size of the display. Then use sine functions with the x and y coordinates to make some nice images.
In my case one is based on the distance to centre of the image, the other is just me being creative

The trick here to make it faster is use values between 0 and 127 so if you add 2 values they won't exceed 256 (if your palette consist of 256 colors ofcourse), you don't have to check that later this way. I used values between 0 and 63 so I could also mix in an image as well.
- when that's done you are ready to create some plasma. based on the time you use... sine functions to calculate an initial x and y position for each of the buffers (in my case 2 plasma buffers and an image)
Then simply add the values from the buffers, use that value with the palette to get the color to blit, increment all the offsets and repeat all of this until the screen is full.
Btw, I said sine is your friend, but it definitely isn't your ppc's friend. It's horribly slow, that's why I was forced to use sine/cosine lookup tables as well.
You can also use much smaller buffers when you are going to use this effect in a game since your not going to use it fullscreen precalcing won't take as long and after pre-calcing it hardly takes any cpu power to draw it.
Ok, I'm not very good at explaining stuff, so just check the code and you'll see it's all pretty simple.