By · Updated

Plasma Effect

Swirling Demoscene Colour Screensaver in Your Browser

No ratings yet

Press Play to start

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Plasma Effect works

This plasma effect fills the screen with swirling colour. Press Play and the canvas fills with slowly swirling bands of colour that never repeat. Slow it down for something to stare at, turn the scale up for tighter ripples, switch to the fire or ocean palette, and put it fullscreen on a monitor you are not using.

Plasma effect: how it works

The plasma effect is one of the founding tricks of the demoscene, the 1990s culture of squeezing impressive graphics out of home computers. It is remarkable for how little it needs: no textures, no particles, no physics, just a few sine waves added together and a colour lookup. The name comes from the way the result looks like the glowing gas in a plasma globe, and it has been a screensaver, a music-visualiser backdrop and a "first real graphics demo" for thirty years.

How it works. For every pixel the sketch adds up a handful of sine functions of the pixel's position and the current time: one along x, one along y, one along the diagonal, and one of the distance from a point that itself circles slowly around the canvas. The sum is a smooth value that rises and falls across the screen, and it is fed through a palette function that turns a number into a colour. Because time is inside each sine, the whole pattern drifts and rotates, and because the four waves have different periods the pattern does not repeat over any length of time you will notice.

Speed and scale. Speed sets how fast time advances, from a slow breathe to a rapid churn. Scale is the spatial frequency of the waves: a low value gives a few broad bands across the whole screen, a high value gives tight concentric ripples and fine interference where the waves cross.

Palettes. Rainbow maps the value onto three sine waves offset by a third of a cycle each, which cycles smoothly through every hue. Fire uses a black-red-orange-yellow ramp, Ocean stays in blues and teals, and Mono is greyscale, which shows the underlying waves most clearly. Palette changes take effect on the next frame.

Performance. The value is computed for every pixel every frame, which is expensive, so the sketch works at a third of the canvas resolution and scales the image up without smoothing. On a fullscreen display that is still a few hundred thousand sine evaluations a frame, comfortably within what a browser can do, and the slight blockiness is faithful to the original low-resolution demos.

FAQ

Why does it look pixelated?

It is computed at a third of the display resolution and scaled up with nearest-neighbour sampling, which keeps it running at full frame rate on large screens. The original demos ran at 320 by 200, so a little blockiness is part of the look; a lower Scale value hides it almost entirely.

Will it ever repeat?

Not in practice. The four waves have periods that are not simple multiples of each other, so the combined pattern would take an impractically long time to return to any earlier state. For a screensaver that is the point: there is nothing to memorise.

Can I add my own palette?

The four built-in palettes cover the classic looks. A custom palette would need a gradient editor, which is more interface than the tool wants; Mono with a low speed is the closest to a neutral background if the colours are too much.

Is it safe for people with photosensitivity?

At the default settings the colour changes are slow and smooth with no flashing, but at high speed and high scale the fine ripples move quickly. If you are sensitive to moving patterns, keep the speed low and use Ocean or Mono.

See also: all Simulations & Screensavers tools, Images, Audio, Video & Screen, PDF, SVG, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Mockups & 3D Making, Diagram Makers, 3D Science, Tracker Music.

Related tools