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.

TheLeadtools.ImageProcessing.SpecialEffects.PerlinCommandcommand uses a pseudo-random number generator in order to create a Perlin noise, and then procedurally transforms that noise into a texture. To use theLeadtools.ImageProcessing.SpecialEffects.PerlinCommandcommand, perform the following steps:

  1. Open any bitmap.
  2. Use theLeadtools.ImageProcessing.SpecialEffects.PerlinCommandcommand 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_CircleNoiseLayoutType values:

purecircle.gif

The following example is using the PF_Combine and PF_CircleNoiseLayoutType values:

circlecombine.gif
.

The following example is using the PF_Difference and PF_CircleNoiseLayoutType values:

circlediff.gif

The following example is using the PF_Pure and PF_LineNoiseLayoutType values::

linepure.gif

The following example is using the PF_Combine and PF_LineNoiseLayoutType values:

linecombine.gif

The following example is using the PF_Difference and PF_LineNoiseLayoutType values:

linediff.gif

The following example is using the PF_Pure and PF_RandomNoiseLayoutType values:

randompure.gif

The following example is using the PF_Combine and PF_RandomNoiseLayoutType values:

randomcombine.gif

The following example is using the PF_Difference and PF_RandomNoiseLayoutType values:

randomdiff.gif

TheLeadtools.ImageProcessing.SpecialEffects.CloudsCommandcommand also makes use of Perlin noise.

LEADTOOLS Imaging, Medical, and Document
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2023LEAD Technologies, Inc.All Rights Reserved.