Using the LBitmap::Perlin 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 LBitmap::Perlin 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 LBitmap::Perlin function, the general process is as follows:


Open any bitmap.


Use the LBitmap::Perlin 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;

For an example, click here.

The LBitmap::Clouds function also makes use of Perlin noise.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help