BRL-CAD
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "bu/log.h"
#include "bu/malloc.h"
#include "bu/parallel.h"
#include "vmath.h"
#include "bn/noise.h"
#include "bn/rand.h"
Include dependency graph for noise.c:

Go to the source code of this file.

Data Structures

struct  str_ht
 
struct  fbm_spec
 

Macros

#define SMOOTHSTEP(x)   ((x) * (x) * (3 - 2*(x)))
 interpolate smoothly from 0 .. 1 More...
 
#define MAXSIZE   267 /* 255 + 3 * (4 values) */
 
#define INCRSUM(m, s, x, y, z)
 
#define TABLE_SIZE   4096
 
#define MAGIC_STRHT1   1771561
 
#define MAGIC_STRHT2   1651771
 
#define MAGIC_TAB1   9823
 
#define MAGIC_TAB2   784642
 
#define CK_HT()
 
#define Hash3d(a, b, c)
 
#define MAGIC_fbm_spec_wgt   0x837592
 
#define PSCALE(_p, _s)   _p[0] *= _s; _p[1] *= _s; _p[2] *= _s
 
#define PCOPY(_d, _s)   _d[0] = _s[0]; _d[1] = _s[1]; _d[2] = _s[2]
 

Functions

void bn_noise_init (void)
 These noise functions provide mostly random noise at the integer lattice points. The functions should be evaluated at non-integer locations for their nature to be realized. More...
 
double bn_noise_perlin (fastf_t *point)
 
void bn_noise_vec (fastf_t *point, fastf_t *result)
 
struct fbm_specfind_spec_wgt (double h, double l, double o)
 
double bn_noise_fbm (fastf_t *point, double h_val, double lacunarity, double octaves)
 
double bn_noise_turb (fastf_t *point, double h_val, double lacunarity, double octaves)
 
double bn_noise_ridged (fastf_t *point, double h_val, double lacunarity, double octaves, double offset)
 
double bn_noise_mf (fastf_t *point, double h_val, double lacunarity, double octaves, double offset)
 

Detailed Description

These noise functions provide mostly random noise at the integer lattice points. The functions should be evaluated at non-integer locations for their nature to be realized.

Contains contributed code from: F. Kenton Musgrave Robert Skinner

Definition in file noise.c.