Package VisionEgg :: Module Dots :: Class DotArea2D
[frames | no frames]

Class DotArea2D

         object --+        
                  |        
ClassWithParameters --+    
                      |    
               Stimulus --+
                          |
                         DotArea2D


Random dots of constant velocity

Every dot has the same velocity. Some fraction of the dots all
move in the one direction, while the rest move in random
directions. Dots wrap around edges. Each dot has a lifespan.

This is just one example of the endless variations on drawing random dots.

Parameters
==========
anchor                  -- (String)
                           Default: center
anti_aliasing           -- (Boolean)
                           Default: True
color                   -- (AnyOf(Sequence3 of Real or Sequence4 of Real))
                           Default: (1.0, 1.0, 1.0)
depth                   -- (Real)
                           Default: (determined at instantiation)
dot_lifespan_sec        -- (Real)
                           Default: 5.0
dot_size                -- (Real)
                           Default: 4.0
on                      -- (Boolean)
                           Default: True
position                -- (Sequence2 of Real)
                           Default: (320.0, 240.0)
signal_direction_deg    -- (Real)
                           Default: 90.0
signal_fraction         -- (Real)
                           Default: 0.5
size                    -- (Sequence2 of Real)
                           Default: (300.0, 300.0)
velocity_pixels_per_sec -- (Real)
                           Default: 10.0

Constant Parameters
===================
num_dots -- (UnsignedInteger)
            Default: 100

Method Summary
  __init__(self, **kw)
Instantiate and get ready to draw.
  draw(self)
Draw the stimulus.
    Inherited from ClassWithParameters
  get_specified_type(self, parameter_name)
  is_constant_parameter(self, parameter_name)
  set(self, **kw)
Set a parameter with type-checked value This is the slow but safe way to set parameters.
  verify_parameters(self)
Perform type check on all parameters...
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Class Variable Summary
tuple __slots__ = ('parameters', 'constant_parameters', 'x_pos...
member_descriptor constant_parameters = <member 'constant_parameters' of '...
dict constant_parameters_and_defaults = {'num_dots': (100, <c...
member_descriptor last_time_sec = <member 'last_time_sec' of 'DotArea2D' o...
member_descriptor parameters = <member 'parameters' of 'DotArea2D' objects...
dict parameters_and_defaults = {'dot_lifespan_sec': (5.0, <cl...
member_descriptor random_directions_radians = <member 'random_directions_r...
member_descriptor start_times_sec = <member 'start_times_sec' of 'DotArea2...
member_descriptor x_positions = <member 'x_positions' of 'DotArea2D' objec...
member_descriptor y_positions = <member 'y_positions' of 'DotArea2D' objec...

Method Details

__init__(self, **kw)
(Constructor)

Instantiate and get ready to draw.

Set parameter values and create anything needed to draw the
stimulus including OpenGL state variables such display lists
and texture objects.
Overrides:
VisionEgg.Core.Stimulus.__init__ (inherited documentation)

draw(self)

Draw the stimulus. (Called by Viewport instance.)

This method is called every frame.  This method actually
performs the OpenGL calls to draw the stimulus.
Overrides:
VisionEgg.Core.Stimulus.draw (inherited documentation)

Class Variable Details

__slots__

Type:
tuple
Value:
('parameters',
 'constant_parameters',
 'x_positions',
 'y_positions',
 'random_directions_radians',
 'last_time_sec',
 'start_times_sec',
 '_gave_alpha_warning')                                                

constant_parameters

Type:
member_descriptor
Value:
<member 'constant_parameters' of 'DotArea2D' objects>                  

constant_parameters_and_defaults

Type:
dict
Value:
{'num_dots': (100, <class 'VisionEgg.ParameterTypes.UnsignedInteger'>)\
}                                                                      

last_time_sec

Type:
member_descriptor
Value:
<member 'last_time_sec' of 'DotArea2D' objects>                        

parameters

Type:
member_descriptor
Value:
<member 'parameters' of 'DotArea2D' objects>                           

parameters_and_defaults

Type:
dict
Value:
{'anchor': ('center', <class 'VisionEgg.ParameterTypes.String'>),
 'anti_aliasing': (True, <class 'VisionEgg.ParameterTypes.Boolean'>),
 'center': (None,
            <VisionEgg.ParameterTypes.Sequence2 object at 0x40c3268c>,
            '',
            1),
 'color': ((1.0, 1.0, 1.0),
           <VisionEgg.ParameterTypes.AnyOf object at 0x40c2d70c>),
...                                                                    

random_directions_radians

Type:
member_descriptor
Value:
<member 'random_directions_radians' of 'DotArea2D' objects>            

start_times_sec

Type:
member_descriptor
Value:
<member 'start_times_sec' of 'DotArea2D' objects>                      

x_positions

Type:
member_descriptor
Value:
<member 'x_positions' of 'DotArea2D' objects>                          

y_positions

Type:
member_descriptor
Value:
<member 'y_positions' of 'DotArea2D' objects>                          

Generated by Epydoc 2.0 on Fri Sep 19 18:29:37 2003 http://epydoc.sf.net