VisionEgg.Dots.DotArea2D

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

# Class DotArea2D

source code

             object --+
                      |
    ClassWithParameters --+
                          |
              Core.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 runtime)
    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

Instance Methods
__init__(self, **kw) Instantiate and get ready to draw. | source code
draw(self) Draw the stimulus. | source code
Inherited from `ClassWithParameters`: `__getstate__`, `__setstate__`, `get_specified_type`, `is_constant_parameter`, `set`, `verify_parameters` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables
| parameters_and_defaults = `{'on':(True, ve_types.Boolean), 'pos`...``
| constant_parameters_and_defaults = `{'num_dots':(100, ve_types.`...``
Inherited from `ClassWithParameters`: `__safe_for_unpickling__`

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, **kw) (Constructor) | source code
    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: Core.Stimulus.__init__ (inherited documentation)

### draw(self) | source code
    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: Core.Stimulus.draw (inherited documentation)

Class Variable Details

  ### parameters_and_defaults Value:
      {'on':(True, ve_types.Boolean), 'position':((320.0, 240.0), ve_types.S
      equence2(ve_types.Real)), 'anchor':('center', ve_types.String), 'size'
      :((300.0, 300.0), ve_types.Sequence2(ve_types.Real)), 'signal_fraction
      ':(0.5, ve_types.Real), 'signal_direction_deg':(90.0, ve_types.Real),
      'velocity_pixels_per_sec':(10.0, ve_types.Real), 'dot_lifespan_sec':(5
      .0, ve_types.Real), 'color':((1.0, 1.0, 1.0), ve_types.AnyOf(ve_types.
      Sequence3(ve_types.Real), ve_types.Sequence4(ve_types.Real))), 'dot_si
      ze':(4.0, ve_types.Real), 'anti_aliasing':(True, ve_types.Boolean), 'd
      ...

  ### constant_parameters_and_defaults Value:
      {'num_dots':(100, ve_types.UnsignedInteger),}