Class Turbulence
Built in Turbulence effect.
public class Turbulence : Effect
- Inheritance
-
Turbulence
- Inherited Members
Constructors
Turbulence(DeviceContext)
Initializes a new instance of Turbulence effect.
public Turbulence(DeviceContext context)
Parameters
context
DeviceContext
Properties
BaseFrequency
The base frequencies in the X and Y direction.. This property is a float and must be greater than 0. The units are specified in 1/DIPs. A value of 1 (1/DIPs) for the base frequency results in the Perlin noise completing an entire cycle between two pixels. The ease interpolation for these pixels results in completely random pixels, since there is no correlation between the pixels. A value of 0.1(1/DIPs) for the base frequency, the Perlin noise function repeats every 10 DIPs. This results in correlation between pixels and the typical turbulence effect is visible
public RawVector2 BaseFrequency { get; set; }
Property Value
- RawVector2
Noise
The turbulence noise mode. This property can be either fractal sum or turbulence. Indicates whether to generate a bitmap based on Fractal Noise or the Turbulence function. See Noise modes for more info.
public TurbulenceNoise Noise { get; set; }
Property Value
OctaveCount
The number of octaves for the noise function. This property is an int and must be greater than 0.
public int OctaveCount { get; set; }
Property Value
Offset
The coordinates where the turbulence output is generated. The algorithm used to generate the Perlin noise is position dependent, so a different offset results in a different output. This property is not bounded and the units are specified in DIPs
public RawVector2 Offset { get; set; }
Property Value
- RawVector2
Remarks
The offset does not have the same effect as a translation because the noise function output is infinite and the function will wrap around the tile.
Seed
The seed for the pseudo random generator. This property is unbounded.
public int Seed { get; set; }
Property Value
Stitchable
Turns stitching on or off. The base frequency is adjusted so that output bitmap can be stitched. This is useful if you want to tile multiple copies of the turbulence effect output. true: The output bitmap can be tiled (using the tile effect) without the appearance of seams. The base frequency is adjusted so that output bitmap can be stitched. false: The base frequency is not adjusted, so seams may appear between tiles if the bitmap is tiled.
public bool Stitchable { get; set; }