This is a script to generate animated lightning bolts, like the one below, with various options.
Here is a quick summary of the options for this script:
Image X and Y size: Controls the dimensions of the final image. Recommended dimensions are a really tall image.
Number of frames: Number of frames (layers) in the final image.
Instability: large values make for quick fluctuations and jagged lightning, small values make for gentler curves
Frequency: How close together peaks on the lightning will be. Larger values mean closer peaks
Detail: How detailed you want the lightning to be. More detailed lightning has more noise.
Hue: Change the colour of the lightning with this
Glow strength: Make the lightning thinner or thicker. Bigger values make for thicker lightning
The final option determines whether or not you wish to make the background transparent. This may be useful if you want to combine the final image with another animation.
Once you have generated your image, save it as an animated gif file.