LEAD Technologies, Inc

Using The PerlinCommand command

Perlin noise 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 Leadtools.ImageProcessing.SpecialEffects.PerlinCommand command uses a pseudo-random number generator in order to create a Perlin noise, and then procedurally transforms that noise into a texture. To use the Leadtools.ImageProcessing.SpecialEffects.PerlinCommand command, perform the following steps:

  1. Open any bitmap.
  2. Use the Leadtools.ImageProcessing.SpecialEffects.PerlinCommand command to create a Perlin noise. Depending upon the options used, the noise can be laid out in circles, lines or randomly. The effect can be applied by itself, combined with another image using an opacity value, or applied as a difference, The following figures demonstrate the command's use. To generate these figures, the following values were used:
    Leadtools.ImageProcessing.SpecialEffects.Seed = 0;
    Leadtools.ImageProcessing.SpecialEffects.Frequency = 16;
    Leadtools.ImageProcessing.SpecialEffects.Iteration = 8;
    Leadtools.ImageProcessing.SpecialEffects.Opacity = 75;
    Leadtools.ImageProcessing.SpecialEffects.Backcolor = new RasterColor (0, 0, 0);
    Leadtools.ImageProcessing.SpecialEffects.PerlinColor = new RasterColor (255, 0, 0);
    Leadtools.ImageProcessing.SpecialEffects.XCircle= image.Width / 2;
    Leadtools.ImageProcessing.SpecialEffects.YCircle = image.Height / 2;
    Leadtools.ImageProcessing.SpecialEffects.FreqLayout = 100;
    Leadtools.ImageProcessing.SpecialEffects.DenLayout = 1;
    Leadtools.ImageProcessing.SpecialEffects.PerlinFlags.NoiseLayoutType = See descriptions

The following example is using the PF_Pure and PF_Circle NoiseLayoutType values:

The following example is using the PF_Combine and PF_Circle NoiseLayoutType values:

.

The following example is using the PF_Difference and PF_Circle NoiseLayoutType values:

The following example is using the PF_Pure and PF_Line NoiseLayoutType values::

The following example is using the PF_Combine and PF_Line NoiseLayoutType values:

The following example is using the PF_Difference and PF_Line NoiseLayoutType values:

The following example is using the PF_Pure and PF_Random NoiseLayoutType values:

The following example is using the PF_Combine and PF_Random NoiseLayoutType values:

The following example is using the PF_Difference and PF_Random NoiseLayoutType values:

The Leadtools.ImageProcessing.SpecialEffects.CloudsCommand command also makes use of Perlin noise.

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.