plasma_effect is a small Python project that renders an animated plasma pattern in real time. NumPy calculates each frame, while Pygame displays it in a window.
The renderer combines sine and cosine waves to create the shifting color patterns. You can change the look with four palettes (warm, cool, lava, and neon) and four motion presets (default, spiral, pulsing, and layered). A specular option adds a lighting effect to the result.
Example
Here is a short recording of the effect:
Try it
The project targets Python 3.13 and uses PDM to install its dependencies:
git clone https://github.com/GildasLepennetier/plasma_effect.git
cd plasma_effect
pdm install
pdm run python plasma_effect.py
While it is running, press P to cycle palettes, M to cycle motion presets, S to toggle specular lighting, and + or - to adjust the animation speed. Press Q or Esc to quit.
You can also record a short animation from the command line:
pdm run python plasma_effect.py --record --record-duration 20 --palette lava --phase-preset spiral
The project is inspired by a plasma effect example published in 2016. Explore the plasma_effect repository for the source and settings.