![]() |
Tiled 2D Amortized Noise
A Program to Generate Infinite Grayscale Noise Textures with Amortized Noise
|
Main. More...
#include "defines.h"#include "SaveImage.h"#include <stdlib.h>#include <stdio.h>#include "InfiniteAmortizedNoise2D.h"#include "FiniteAmortizedNoise2D.h"#include "CPUtime.h"Functions | |
| float | Generate2DNoise (float **cell, const int x, const int y, const int m0, const int m1, const int n) |
| void | GenerateAndSave2DNoise (int nRow, int nCol, const int m0, const int m1, const int n, const int seed) |
| int | main (int argc, char *argv[]) |
Variables | |
| CFiniteAmortizedNoise2D * | g_pFiniteAmortizedNoise = NULL |
| Pointer to the finite amortized 2D noise generator. | |
| CInfiniteAmortizedNoise2D * | g_pInfiniteAmortizedNoise = NULL |
| Pointer to the infinite amortized 2D noise generator. | |
| bool | g_bInfinite = true |
| Whether to use infinite noise: true for infinite noise, false for finite noise. | |
| float Generate2DNoise | ( | float ** | cell, |
| const int | x, | ||
| const int | y, | ||
| const int | m0, | ||
| const int | m1, | ||
| const int | n | ||
| ) |
Generate a random cell of 2D noise.
| cell | Pointer to array in which to store the noise. |
| x | Tile column index. |
| y | Tile row index. |
| m0 | Largest octave. |
| m1 | Smallest octave. |
| n | Cell size. |
| void GenerateAndSave2DNoise | ( | int | nRow, |
| int | nCol, | ||
| const int | m0, | ||
| const int | m1, | ||
| const int | n, | ||
| const int | seed | ||
| ) |
Generate a cell of 2D noise and save it as an image file.
| nRow | Tile row index. |
| nCol | Tile column index. |
| m0 | Largest octave. |
| m1 | Smallest octave. |
| n | Cell size. |
| seed | Hash function seed. |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Main.
| argc | Argument count |
| argv | Arguments. |
1.8.2