The Physiologist's Friend Simulation API

ch.unizh.ini.friend.stimulus
Class GratingStimulus

java.lang.Object
  extended by ch.unizh.ini.friend.stimulus.AbstractStimulus
      extended by ch.unizh.ini.friend.stimulus.ConcreteStimulus
          extended by ch.unizh.ini.friend.stimulus.GratingStimulus
All Implemented Interfaces:
Updateable, Stimulus, Cloneable

public class GratingStimulus
extends ConcreteStimulus

A grating stimulus, which consists of a set of BarStimulus with a specified spatial period.

Since:
$Revision: 1.8 $
Author:
tobi

Field Summary
protected static float PERIOD
          the default spatial period of the grating: 2.0f.
protected static float SCREEN_MULTIPLE
          size of the grating stimulus as a multiple of the screen size
 
Fields inherited from class ch.unizh.ini.friend.stimulus.AbstractStimulus
backgroundExcitationDensity, BRIGHTNESS_CHANGE_RATIO, foregroundExcitationDensity, newBackgroundExcitationDensity, newForegroundExcitationDensity, newShape, shapes, transforms
 
Fields inherited from interface ch.unizh.ini.friend.stimulus.Stimulus
BACKGROUND_BRIGHTNESS, BRIGHTEN_BACKGROUND, BRIGHTEN_FOREGROUND, DARKEN_BACKGROUND, DARKEN_FOREGROUND, FOREGROUND_BRIGHTNESS, RESIZE_RATIO, ROTATE_BY
 
Constructor Summary
GratingStimulus()
          Creates a new instance of GratingStimulus with default spatial period PERIOD.
GratingStimulus(float period)
          Creates a new instance of GratingStimulus with specified spatial period.
 
Method Summary
static void main(String[] args)
           
 
Methods inherited from class ch.unizh.ini.friend.stimulus.ConcreteStimulus
clone, update
 
Methods inherited from class ch.unizh.ini.friend.stimulus.AbstractStimulus
addShape, brightenBackground, brightenForeground, clearShapes, compute, darkenBackground, darkenForeground, expand, fatten, flipContrast, getBackgroundExcitationDensity, getForegroundExcitationDensity, getShapes, getTransformedShapes, getTransforms, isVisible, lengthen, removeShape, rotate, rotateCCW, rotateCW, setBackgroundExcitationDensity, setForegroundExcitationDensity, setShapes, setTransforms, setVisible, shorten, shrink, thin, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PERIOD

protected static final float PERIOD
the default spatial period of the grating: 2.0f. Compare this dimension with the screen dimensions.

See Also:
Constant Field Values

SCREEN_MULTIPLE

protected static final float SCREEN_MULTIPLE
size of the grating stimulus as a multiple of the screen size

See Also:
Constant Field Values
Constructor Detail

GratingStimulus

public GratingStimulus()
Creates a new instance of GratingStimulus with default spatial period PERIOD.


GratingStimulus

public GratingStimulus(float period)
Creates a new instance of GratingStimulus with specified spatial period. The number of bars is computed so that the grating covers the screen even when mouse reference position moves to the edge of the screen.

Parameters:
period - Period of grating in units of TangentScreen.SCREEN_DIMENSION. A period of 1 means a black and white grating pair every screen dimension units.
Method Detail

main

public static void main(String[] args)

http://www.ini.unizh.ch/~tobi/friend