STIRA  0.1
Public Member Functions | List of all members
stira::imagetools::PerlinNoise Class Reference

class to generate clouds of Perlin noise code slightly adapted from code of Isaac McGarvey: http://infohost.nmt.edu/~imcgarve/perlin_noise/ More...

#include <PerlinNoise.h>

Public Member Functions

 PerlinNoise ()
 constructor
 
 ~PerlinNoise ()
 destructor
 
ImageGenerate (float persistence, int octaves, unsigned int width, unsigned int height, float red, float green, float blue, int seed, float zoom)
 Generates an Image containing Perlin clouds Values are allowed to overfloat; afterwards, they are put back in the range with a modulus operation. More...
 
ImageGenerateNormalized (float persistence, int octaves, unsigned int width, unsigned int height, float red, float green, float blue, int seed, float zoom)
 Generates an Image containing normalized Perlin clouds Values are scaled in the right range with linear range rescaling. More...
 

Detailed Description

class to generate clouds of Perlin noise code slightly adapted from code of Isaac McGarvey: http://infohost.nmt.edu/~imcgarve/perlin_noise/

to check for other textures: http://lodev.org/cgtutor/randomnoise.html

Member Function Documentation

Image * stira::imagetools::PerlinNoise::Generate ( float  persistence,
int  octaves,
unsigned int  width,
unsigned int  height,
float  red,
float  green,
float  blue,
int  seed,
float  zoom 
)

Generates an Image containing Perlin clouds Values are allowed to overfloat; afterwards, they are put back in the range with a modulus operation.

Parameters
persistencefactor with which the noise per octave is multiplied
octavesnr of octaves ("different frequencies") used in generating the Perlin noise
widthwidth of image to generate
heightheight of image to generate
redrelative fraction of red in general background color
greenrelative fraction of green in general background color
bluerelative fraction of blue in general background color
seedseed to initialize random generator
zoomzoom factor

References stira::imagedata::Image::SetColor().

Image * stira::imagetools::PerlinNoise::GenerateNormalized ( float  persistence,
int  octaves,
unsigned int  width,
unsigned int  height,
float  red,
float  green,
float  blue,
int  seed,
float  zoom 
)

Generates an Image containing normalized Perlin clouds Values are scaled in the right range with linear range rescaling.

Parameters
persistencefactor with which the noise per octave is multiplied
octavesnr of octaves ("different frequencies") used in generating the Perlin noise
widthwidth of image to generate
heightheight of image to generate
redrelative fraction of red in general background color
greenrelative fraction of green in general background color
bluerelative fraction of blue in general background color
seedseed to initialize random generator
zoomzoom factor

References stira::imagedata::Image::SetColor().


The documentation for this class was generated from the following files: