Class StimulusObject

Class StimulusObject

java.lang.Object
   |
   Warning: links to the API classes above do not exist.  Only links to the 
   Ponzo classes and the "see also" classes exist. If you choose a link 
   that does not exist, simply hit the right mouse button to return to this frame.
   |
   +----StimulusObject
To Go Back click here.
class StimulusObject
extends Object
This class builds and displays the poggendoff stimuli.
See Also:
StimulusExtent

Constructor Index

 o StimulusObject(int, int, double, double, double, double, double, double, double)
This constructor initializes the ponzo stimuli via the display parameters
      collected from the html file.

Method Index

 o AdjustCmpLine(int, double, double, Point[])
 this method will adjust the cmp line, i.e., make longer if ascending type of trial,
              shorter is a descending type of trial.
  
 o AvgCmpLineAsc()
This method returns the averge comparison line for an ascending type of
        trial (i.e., right and left end points).
 o AvgCmpLineDec()
This method returns the averge comparison line for an descending type of
        trial (i.e., right and left end points).
 o AvgCmpMidPoint()
This method returns the midpoint of an averge comparison line (i.e., right and left end points).
 o ClearMe(Graphics, int, int)
This routine will clear the comparison line.
 o CmpInsets()
 This method will return comparison lines inset value
 o DrawMe(Graphics, Point[], int)
 This method will draw the ponzo illusion.
  
 o GetStimulusExtent()
 This method will a StimulusExtent class
 o InitialCmpLength(Point[])
 This method will return the length of the initial comparison line 
 o OffsetRangeAsc()
This method returns the range of offsets used to either increase or decrease the
        lenght of the average comparison line lengths used in descending types
        of trials.
 o OffsetRangeDec()
This method returns the range of offsets used to either increase or decrease the
        lenght of the average comparison line lengths used in descending types
        of trials.
 o SaveAsCurrentCmpLine(Point[])
 This method saves the comparison line BEFORE it changes size.
  
 o StandardLength()
 This method will return the length of the standard line 
 o StandardLine()
This method returns the standard line (i.e., right and left end points).

Constructors

 o StimulusObject
  public StimulusObject(int w,
                        int h,
                        double lp,
                        double tp,
                        double sp,
                        double stdp,
                        double stdInsets,
                        double cInsets,
                        double meanC)
This constructor initializes the ponzo stimuli via the display parameters
      collected from the html file.  The stimuli consists of 4 parts: a left and
      right, tilted, vertical line segement, the standard horizontal segement (near the top), and the
      comparison horizontal segment (below the standard).  The only segment that will change from trial to
      trial will be the lenght of the comparison segement.  This routine, therefore,
      will position each segment except the comparison segment in their constant positions.
      Note that upper left hand canvas corner is (0,0).
      The constructor will do some adjustment to the html parameters values if the stimulus turns
      out not to fit on the canvas.
      Note also: the average comparison line lenght in an ascending trial will be 1/2 the
      standard lenght.  The average comparison line lenght in a decending trial will be
      1.5 times the standard.  This latter lenght may pose problems in that, depending on
      where the comparison line is placed (see "Dp" html parameter) in that this average lenght could
      intersect the two tilted lines.  This   
.
Parameters:
w - is the width of the canvas
h - is the height of the canvas
lp - controls main, tilted line segment length
tp - controls tilt of main line segments
sp - controls seperation between the tops of the 2 main, tilted, line segments
Returns:
void

Methods

 o ClearMe
  public void ClearMe(Graphics g,
                      int width,
                      int height)
This routine will clear the comparison line.
Parameters:
g - is the graphics contexts
width - is the width of the applet canvas
height - is the height of the applet canvas
Returns:
void
 o DrawMe
  public void DrawMe(Graphics g,
                     Point initialCmpLine[],
                     int trialType)
 This method will draw the ponzo illusion. 
Parameters:
g - is the graphics object attached to the canvas class of which this method is
             a member.
Returns:
void
 o StandardLength
  public int StandardLength()
 This method will return the length of the standard line 
Returns:
the length of the standard line
 o InitialCmpLength
  public int InitialCmpLength(Point line[])
 This method will return the length of the initial comparison line 
Parameters:
an - array of 2 points that define the initial comparison line
Returns:
the length of the initial comparison line
 o CmpInsets
  public double CmpInsets()
 This method will return comparison lines inset value
Returns:
comparison line inset value
 o GetStimulusExtent
  public StimulusExtent GetStimulusExtent()
 This method will a StimulusExtent class
Returns:
StimulusExtent class
 o StandardLine
  public Point[] StandardLine()
This method returns the standard line (i.e., right and left end points).
Parameters:
NULL - no parameters
Returns:
Point [] an array of 2 points.
 o AvgCmpLineAsc
  public Point[] AvgCmpLineAsc()
This method returns the averge comparison line for an ascending type of
        trial (i.e., right and left end points).
Parameters:
NULL - no parameters
Returns:
Point [] an array of 2 points.
 o AvgCmpLineDec
  public Point[] AvgCmpLineDec()
This method returns the averge comparison line for an descending type of
        trial (i.e., right and left end points).
Parameters:
NULL - no parameters
Returns:
Point [] an array of 2 points.
 o AvgCmpMidPoint
  public Point AvgCmpMidPoint()
This method returns the midpoint of an averge comparison line (i.e., right and left end points).
Parameters:
NULL - no parameters
Returns:
Point
 o OffsetRangeDec
  public double OffsetRangeDec()
This method returns the range of offsets used to either increase or decrease the
        lenght of the average comparison line lengths used in descending types
        of trials.
Parameters:
NULL - no parameters
Returns:
the range of offset values
 o OffsetRangeAsc
  public double OffsetRangeAsc()
This method returns the range of offsets used to either increase or decrease the
        lenght of the average comparison line lengths used in descending types
        of trials.
Parameters:
NULL - no parameters
Returns:
the range of offset values
 o AdjustCmpLine
  public Point[] AdjustCmpLine(int trialType,
                               double q,
                               double stepSize,
                               Point line[])
 this method will adjust the cmp line, i.e., make longer if ascending type of trial,
              shorter is a descending type of trial. 
Parameters:
trialType - is type of trial
line - is an array of 2 Points that defines the current comparison line
q - is the factor by which the new step size is found
Returns:
an array of 2 Points that defines the new comparison line.
 o SaveAsCurrentCmpLine
  public void SaveAsCurrentCmpLine(Point line[])
 This method saves the comparison line BEFORE it changes size.
  
Parameters:
line - is the new comparison line
Returns:
Point [] an array of 2 points that define the initial comparison line