Using The L_PerlinBitmap Function

The Perlin noise function was developed in the 1980s by Ken Perlin, who was working with procedural textures. He wanted to create a function that would appear to be random, but that when supplied the same input would always produce the same output, and that would feature smooth transitions between values. Ken Perlin would later win an Oscar for this work.

The L_PerlinBitmap function uses a pseudo-random number generator in order to create a Perlin noise, and then procedurally transforms that noise into a texture When using the L_PerlinBitmap function, the general process is as follows:

1.

Open any bitmap.

2.

Use the L_PerlinBitmap function to create a Perlin noise. The following figures show various Perlin noise shapes resulting from the use of various flags. For these figures, the following values were also used:

uSeed = 0;
uFrequency = 16;
uIteration = 8;
uOpacity = 75;
crBClr = RGB(0, 0, 0);
crFClr = RGB(255, 0, 0);
nxCircle = image.Width / 2;
nyCircle = image.Height / 2;
nFreqLayout = 100;
nDenLayout = 1;

First: using PRL_CIRCLE:

1.

PRL_PURE

 

image\purecircle.gif

2.

PRL_COMBINE

 

image\circlecombine.gif

3.

PRL_DIFFERENCE

 

image\circlediff.gif

Second: using PRL_LINE:

1.

PRL_PURE

 

image\linepure.gif

2.

PRL_COMBINE

 

image\linecombine.gif

3.

PRL_DIFFERENCE

 

image\linediff.gif

Third: using PRL_RANDOM:

1.

PRL_PURE

 

image\randompure.gif

2.

PRL_COMBINE

 

image\randomcombine.gif

3.

PRL_DIFFERENCE

 

image\randomdiff.gif

The L_CloudsBitmap function also makes use of Perlin noise.