Enum PdnWavesWaveform
- Namespace
- PaintDotNet.Effects.Gpu
- Assembly
- PaintDotNet.Effects.Gpu.dll
Specifies the shape of the wave that PdnWavesEffect uses to displace the image.
public enum PdnWavesWaveform
Fields
Sine = 0A smooth sine wave, which produces gentle rounded undulations.
Triangle = 1A triangle wave, which produces sharp creases at the peaks and troughs. This gives the image a faceted, "zig zag" appearance.
Sawtooth = 2A sawtooth wave, which ramps smoothly and then drops abruptly. This produces a series of hard steps in the image.
Square = 3A square wave, which alternates between full positive and full negative displacement with nothing in between. This tears the image into hard offset strips rather than deforming it.
Semicircle = 4Alternating half-circles, which produce rounder, more scalloped crests than a sine wave.
Harmonics = 5Three octaves of sine summed together at halving amplitudes. The result is less regular than a plain sine wave, which reads as a more natural water surface.
The upper octaves make this the steepest of the smooth waveforms, so it is scaled down to bring its slope in line with a sine's. That keeps it from folding earlier than every other waveform at the same amplitude, at the cost of displacing about 58% as far.
SteppedSine = 6A sine wave quantized to a fixed number of discrete levels, which displaces the image in visible bands instead of smoothly.
Remarks
Every waveform is normalized to the range [-1, +1], which is what lets PaintDotNet.Effects.Gpu.PdnWavesSampleMap.GetMaxSampleOffset(System.Single,PaintDotNet.Effects.Gpu.PdnWavesPattern,System.Single) bound the displacement by the amplitude alone, regardless of which waveform is selected.