Packagede.popforge.imageprocessing.filters.render
Classpublic final class SinePlasma
ImplementsIFilter

The SinePlasma class is a filter that generates a plasma based on non-distorted sine waves.

The formula of this filter is new = ( 0x7f + 63.5 * sin( frequencyX * x ) + 63.5 * sin( frequencyY * y ) ) * amplitude.

This filter is based on a technique from toxie^ainc. and the C++ implementation from Hopper.

Supported formats:


Example
  
  var filter: SinePlasma = new SinePlasma();
  
  var image: Image = new Image( 160, 120, ImageFormat.RGB );
  
  filter.apply( image );
  

See also

apocalypse inc.


Public Methods
 MethodDefined by
  
SinePlasma(amplitude:Number = 1, frequencyX:Number = 0.0625, frequencyY:Number = 0.0625)
Creates a new SinePlasma object.
SinePlasma
  
apply(image:Image):void
Applies the filter to the given Image object.
SinePlasma
  
toString():String
Builds and returns a string containing the name of the class.
SinePlasma
Constructor detail
SinePlasma()constructor
public function SinePlasma(amplitude:Number = 1, frequencyX:Number = 0.0625, frequencyY:Number = 0.0625)

Creates a new SinePlasma object.

Parameters
amplitude:Number (default = 1) — The amplitude of the sine waves.
 
frequencyX:Number (default = 0.0625) — The wave frequency in x direction.
 
frequencyY:Number (default = 0.0625) — The wave frequency in y direction.
Method detail
apply()method
public function apply(image:Image):void

Applies the filter to the given Image object.

Parameters
image:Image — The image that will be manipulated.
toString()method 
public function toString():String

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

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