DESY ACOP Beans Home

com.cosylab.gui.components.gauger
Class NoiseMaker

java.lang.Object
  extended by com.cosylab.gui.components.gauger.NoiseMaker

public class NoiseMaker
extends java.lang.Object

Simple class to generate perlin noise signal.

Version:
$id$
Author:
Ales Pucelj

Constructor Summary
NoiseMaker()
           
 
Method Summary
static double interpolatedNoise(double x)
          Returns cosine interpolated noise value between two integral time units.
static void main(java.lang.String[] args)
          Simple test method.
static double noise(long x)
          Pseudo-random generator function.
static double perlinNoise(double x)
          Returns pseudo random noise signal at given value.
static double smoothedNoise(long x)
          Returns gaussian averaged noise value sampled over three time units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoiseMaker

public NoiseMaker()
Method Detail

noise

public static final double noise(long x)
Pseudo-random generator function. Returns random value at given time. This function will return pseudo-random values for increasing time, but always same value for same time.

Parameters:
x - time.
Returns:
Random value at given time.

smoothedNoise

public static final double smoothedNoise(long x)
Returns gaussian averaged noise value sampled over three time units.

Parameters:
x - time offset.
Returns:
Smoothed noise value.

interpolatedNoise

public static final double interpolatedNoise(double x)
Returns cosine interpolated noise value between two integral time units.

Parameters:
x - time.
Returns:
Interpolated noise value at time x between floor(x) and ceil(x)

perlinNoise

public static final double perlinNoise(double x)
Returns pseudo random noise signal at given value. For a given parameter x the return value will always be the same, but for increasing values, return value will be seemingly random smoothed noise.

Parameters:
x - Time at which to sample the noise.
Returns:
Value of signal.

main

public static void main(java.lang.String[] args)
Simple test method.

Parameters:
args - Not used.


Copyright © 2010. All Rights Reserved.