perlin_noise.SmoothNoise Class Reference

Class for generating smooth noise. More...

List of all members.

Public Member Functions

def __init__
 Constructs a new SmoothNoise object.
def generate
 Generates a grid with the smooth noise.
def linear_interpolation
def cosine_interpolation
def cubic_interpolation

Public Attributes

 nois_fn
 uniform_noise
 width
 height
 interpolation


Detailed Description

Class for generating smooth noise.

Successive calls to generate will use the same underlying grid of uniform noise to sample from.

Definition at line 48 of file perlin_noise.py.


Member Function Documentation

def perlin_noise.SmoothNoise.__init__ (   self,
  width,
  height,
  noise_fn = make_uniform_noise,
  interpolation = 'linear' 
)

Constructs a new SmoothNoise object.

Parameters:
width Width of the grid to generate
height Height of the grid to generate
noise_fn A function that takes two arguments (the grid dimensions) and return a grid of noise
interpolation A string that specifies what interpolation scheme to use. Can be 'linear', 'cosine', or 'cubic'.

Definition at line 59 of file perlin_noise.py.

def perlin_noise.SmoothNoise.cosine_interpolation (   self,
  k 
)

Definition at line 102 of file perlin_noise.py.

def perlin_noise.SmoothNoise.cubic_interpolation (   self,
  k 
)

Definition at line 120 of file perlin_noise.py.

def perlin_noise.SmoothNoise.generate (   self,
  k 
)

Generates a grid with the smooth noise.

Parameters:
k The sampling distance, usually a power of 2. If k == 1, every point in the uniform noise grid is sampled and the returned grid is equivalent to the uniform noise grid.

Definition at line 82 of file perlin_noise.py.

def perlin_noise.SmoothNoise.linear_interpolation (   self,
  k 
)

Definition at line 85 of file perlin_noise.py.


Member Data Documentation

Definition at line 64 of file perlin_noise.py.

Definition at line 67 of file perlin_noise.py.

Definition at line 60 of file perlin_noise.py.

Definition at line 61 of file perlin_noise.py.

Definition at line 63 of file perlin_noise.py.


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

Generated on Sun May 24 21:48:22 2009 by  doxygen 1.5.8