Packagede.popforge.imageprocessing.geom.maps
Classpublic final class RippleMap
InheritanceRippleMap Inheritance GeometricMap

The RippleMap class is a displacement map that uses sine waves to displace given points. This displacement map will affect all given points because it has no bounds or radius. The behaviour of the displace function is also very easy to describe since it uses only this formula for x and y coordinates of a point: p1 = p0 + amplitude * sin( p0 * frequency )



Public Methods
 MethodDefined by
  
RippleMap(amplitudeX:Number, amplitudeY:Number, frequencyX:Number, frequencyY:Number)
Creates a new RippleMap object.
RippleMap
  
displace(point:Point):Boolean
Displaces a Point with the given displace function.
RippleMap
  
toString():String
Builds and returns a string containing the name of the class.
RippleMap
Constructor detail
RippleMap()constructor
public function RippleMap(amplitudeX:Number, amplitudeY:Number, frequencyX:Number, frequencyY:Number)

Creates a new RippleMap object.

Parameters
amplitudeX:Number — Amplitude of the ripple in x direction.
 
amplitudeY:Number — Amplitude of the ripple in y direction.
 
frequencyX:Number — Frequency of the ripple in x direction.
 
frequencyY:Number — Frequency of the ripple in y direction.
Method detail
displace()method
public override function displace(point:Point):Boolean

Displaces a Point with the given displace function. This function modifies the original point and checks if it has been modified or not. A sphere map can check first if the point is inside of its radius. If this is not the case the displace function should return false.

Parameters
point:Point — The point that will be displaced.

Returns
Booleantrue if the x or y value of the Point has been changed.
toString()method 
public override function toString():String

Builds and returns a string containing the name of the class.

Returns
String — A string containing the name of the class.