|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.texture.procedural.PerlinNoiseGenerator
public class PerlinNoiseGenerator
Computes Perlin Noise for three dimensions.
The result is a continuous function that interpolates a smooth path along a series random points. The function is consitent, so given the same parameters, it will always return the same value. The smoothing function is based on the Improving Noise paper presented at Siggraph 2002.
Computing noise for one and two dimensions can make use of the 3D problem space by just setting the un-needed dimensions to a fixed value.
Constructor Summary | |
---|---|
PerlinNoiseGenerator()
Create a new noise creator with the default seed value |
|
PerlinNoiseGenerator(int seed)
Create a new noise creator with the given seed value for the randomness |
Method Summary | |
---|---|
double |
imporvedTurbulence(double x,
double y,
double z,
float loF,
float hiF)
Create a turbulent noise output based on the core noise function. |
double |
improvedNoise(double x,
double y,
double z)
Computes noise function for three dimensions at the point (x,y,z). |
float |
noise1(float x)
1-D noise generation function using the original perlin algorithm. |
float |
noise2(float x,
float y)
Create noise in a 2D space using the orignal perlin noise algorithm. |
float |
noise3(float x,
float y,
float z)
Create noise in a 3D space using the orignal perlin noise algorithm. |
float |
tileableNoise1(float x,
float w)
Create a 1D tileable noise function for the given width. |
float |
tileableNoise2(float x,
float y,
float w,
float h)
Create a 2D tileable noise function for the given width and height. |
float |
tileableNoise3(float x,
float y,
float z,
float w,
float h,
float d)
Create a 3D tileable noise function for the given width, height and depth. |
float |
tileableTurbulence2(float x,
float y,
float w,
float h,
float freq)
Create a turbulance function that can be tiled across a surface in 2D. |
float |
tileableTurbulence3(float x,
float y,
float z,
float w,
float h,
float d,
float freq)
Create a turbulance function that can be tiled across a surface in 3D. |
float |
turbulence2(float x,
float y,
float freq)
Create a turbulance function in 2D using the original perlin noise function. |
float |
turbulence3(float x,
float y,
float z,
float freq)
Create a turbulance function in 3D using the original perlin noise function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerlinNoiseGenerator()
public PerlinNoiseGenerator(int seed)
seed
- The seed value to useMethod Detail |
---|
public double improvedNoise(double x, double y, double z)
x
- x dimension parametery
- y dimension parameterz
- z dimension parameter
public float noise1(float x)
x
- Seed for the noise function
public float noise2(float x, float y)
x
- The X coordinate of the location to sampley
- The Y coordinate of the location to sample
public float noise3(float x, float y, float z)
x
- The X coordinate of the location to sampley
- The Y coordinate of the location to samplez
- The Z coordinate of the location to sample
public double imporvedTurbulence(double x, double y, double z, float loF, float hiF)
sin(point + turbulence(point) * point.x);
public float turbulence2(float x, float y, float freq)
x
- The X coordinate of the location to sampley
- The Y coordinate of the location to samplefreq
- The frequency of the turbluance to create
public float turbulence3(float x, float y, float z, float freq)
x
- The X coordinate of the location to sampley
- The Y coordinate of the location to samplez
- The Z coordinate of the location to samplefreq
- The frequency of the turbluance to create
public float tileableNoise1(float x, float w)
x
- The X coordinate to generate the noise forw
- The width of the tiled block
public float tileableNoise2(float x, float y, float w, float h)
x
- The X coordinate to generate the noise fory
- The Y coordinate to generate the noise forw
- The width of the tiled blockh
- The height of the tiled block
public float tileableNoise3(float x, float y, float z, float w, float h, float d)
x
- The X coordinate to generate the noise fory
- The Y coordinate to generate the noise forz
- The Z coordinate to generate the noise forw
- The width of the tiled blockh
- The height of the tiled blockd
- The depth of the tiled block
public float tileableTurbulence2(float x, float y, float w, float h, float freq)
x
- The X coordinate of the location to sampley
- The Y coordinate of the location to samplew
- The width to tile overh
- The height to tile overfreq
- The frequency of the turbluance to create
public float tileableTurbulence3(float x, float y, float z, float w, float h, float d, float freq)
x
- The X coordinate of the location to sampley
- The Y coordinate of the location to samplez
- The Z coordinate of the location to samplew
- The width to tile overh
- The height to tile overd
- The depth to tile overfreq
- The frequency of the turbluance to create
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |