|
STIRA
0.1
|
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 | |
| Image * | 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. More... | |
| Image * | 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. More... | |
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
| 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.
| persistence | factor with which the noise per octave is multiplied |
| octaves | nr of octaves ("different frequencies") used in generating the Perlin noise |
| width | width of image to generate |
| height | height of image to generate |
| red | relative fraction of red in general background color |
| green | relative fraction of green in general background color |
| blue | relative fraction of blue in general background color |
| seed | seed to initialize random generator |
| zoom | zoom 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.
| persistence | factor with which the noise per octave is multiplied |
| octaves | nr of octaves ("different frequencies") used in generating the Perlin noise |
| width | width of image to generate |
| height | height of image to generate |
| red | relative fraction of red in general background color |
| green | relative fraction of green in general background color |
| blue | relative fraction of blue in general background color |
| seed | seed to initialize random generator |
| zoom | zoom factor |
References stira::imagedata::Image::SetColor().
1.8.11