org.xith3d.utility.math
Class NoiseFactory

java.lang.Object
  extended by org.xith3d.utility.math.NoiseFactory

public final class NoiseFactory
extends java.lang.Object

Bunch of functions for generating noise in different forms.


Method Summary
static float cosineInterpolate(float a, float b, float x)
          smother interpolation between two values.
static int intNoise(int x)
          Fairly bad noise function.
static float linearInterpolate(float a, float b, float x)
          linear interpolation between two values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

intNoise

public static int intNoise(int x)
Fairly bad noise function. But it is predictable and quick. Good for testing.


linearInterpolate

public static float linearInterpolate(float a,
                                      float b,
                                      float x)
linear interpolation between two values.

Parameters:
a - start point
b - end point
x - value between 0 and 1 representing the distance from a to b you want a new point

cosineInterpolate

public static float cosineInterpolate(float a,
                                      float b,
                                      float x)
smother interpolation between two values.

Parameters:
a - start point
b - end point
x - value between 0 and 1 representing the distance from a to b you want a new point