MasterScan  Lab_Matlab_control Master Branch
List of all members | Properties and Events | Protected Properties | Methods
dotsDrawableDotKinetogramDebug Class Reference
Inheritance diagram for dotsDrawableDotKinetogramDebug:
Inheritance graph
[legend]

Properties and Events

Property xCenter = 0
 07/03/2018 jig updated random-number generating syntax to use recommended rng instead of rand More...
 
Property yCenter = 0
 the y-coordinate of the center of the dot field (degrees visual angle, centered)
 
Property coherence = 50
 percentage of dots that carry the intended motion signal
 
Property coherenceSTD = 0
 to randomize coherence
 
Property flipDir = false
 if flip when random coherence < 0
 
Property density = 16.7
 density of dots in the kinetogram (dots per degree-visual-angle^2 per second)
 
Property direction = 0
 The direction of the motion signal, or an array of directions to be picked at random by directionWeights (degrees counterclockwise from rightward)
 
Property directionWeights = 1
 when direction is an array, the relative frequency of each direction (the pdf). More...
 
Property diameter = 5
 diameter of the circular aperture through which dots are shown (degrees visual angle)
 
Property fieldScale = 1.1
 fraction of diameter that determines the width of the underlying dot field. More...
 
Property drunkenWalk = 0
 width of angular error to add to each dot's motion (degrees)
 
Property speed = 3
 speed of each dot's motion (degrees visual angle per second)
 
Property interleaving = 3
 number disjoint sets of dots to interleave frame-by-frame
 
Property isMovingAsHerd = false
 how to move coherent dots: as one rigid unit (true), or each dot independently (false)
 
Property isFlickering = true
 how to move non-coherent dots: by replotting from scratch (true), or by local increments (false)
 
Property isWrapping = true
 how to move dots near the edges: by wrapping to the other side (true), or by replotting from scratch (false)
 
Property isLimitedLifetime = true
 how to pick coherent dots: favoring recently non-coherent dots (true), or indiscriminately (false)
 
Property stencilNumber = 2
 OpenGL stencil to use for the circular aperture.
 
Property randBase = sum(clock*10)
 If not nan, this value specifies a "NO-VAR" condition that produces the exact sequence of dots for a given coherence and direction (assuming all other properties are constant). More...
 
Property dotsPositions = []
 dot positions, active and coherence states, all gathered in a single x-by-y-by-z 3D-matrix. More...
 
Property recordDotsPositions = false
 Flag controlling whether to record dots positions or not Note, this doesn't record any time stamp. More...
 
- Properties and Events inherited from dotsDrawableVertices
Property x = 0
 vertex x-positions (x, y, and z must be scalar or match sizes)
 
Property y = 0
 vertex y-positions (x, y, and z must be scalar or match sizes)
 
Property z = 0
 vertex z-positions (x, y, and z must be scalar or match sizes)
 
Property colors = [1 1 1]
 color map to use for vertices [r g b a; r g b a; etc. More...
 
Property isColorByVertexGroup = false
 whether to color vertices in groups(true) or individually(false)
 
Property indices = []
 array of indices for selecting, reusing, and reordering vertices More...
 
Property pixelSize = 1
 width in pixels for points or lines
 
Property isSmooth = false
 whether to use anti-aliasing for primitives
 
Property primitive = 0
 index to choose OpenGL vertex drawing mode More...
 
Property usageHint = 3
 index to choose usage "hint" for OpenGL buffers More...
 
Property translation = []
 optional translation to apply to vertex positions [tX tY tZ] More...
 
Property rotation = []
 optional rotation of vertices about coordinate axes [rX rY rZ] More...
 
Property scaling = []
 optional scaling to apply to vertex positions [sX sY sZ] More...
 
- Properties and Events inherited from dotsDrawable
Property isVisible = true
 true or false, whether to draw() this object
 

Protected Properties

Property nDots
 number of dots in the kinetogram, includes all interleaving frames. More...
 
Property normalizedXY
 2xn matrix of dot xCenter and yCenter coordinates More...
 
Property fieldWidth
 size of the drawing rectangle in units of degrees visual angle
 
Property directionCDFInverse
 lookup table to pick random dot direction by directionWeights
 
Property directionCDFSize = 1e3
 resolution of directionCDFInverse
 
Property frameNumber = 0
 counter to keep track of interleaving frames
 
Property frameSelector
 logical array to select dots for a frame
 
Property dotLifetimes
 count of how many consecutive frames each dot has moved coherently
 
Property deltaR
 radial step pixelSize for dots moving by local increments (normalized units)
 
Property thisRandStream
 The random number stream used by this object, to be able to reproduce specific dots patterns later.
 
- Protected Properties inherited from dotsDrawableVertices
Property attribBufferInfo = []
 identifier and other info for the OpenGL vertex attribute buffer
 
Property isAttribBufferStale = true
 whether or not the attribute buffer is out of date
 
Property indexBufferInfo = []
 identifier and other info for the OpenGL vertex index buffer
 
Property isIndexBufferStale = true
 whether or not the index buffer is out of date
 
Property colorBufferInfo = []
 identifier and other info for the OpenGL vertex color buffer
 
Property isColorBufferStale = true
 whether or not the color buffer is out of date
 
Property smoothMap
 map primitive integers to dotsMglSmoothness() switches
 

Methods

self dotsDrawableDotKinetogramDebug ()
 Constructor takes no arguments.
 
 prepareToDrawInWindow (self)
 Compute some parameters and create a circular aperture texture.
 
 computeNextFrame (self)
 Compute dot positions for the next frame of animation.
 
 draw (self)
 Draw the next frame of animated dots in a cirular aperture.
 
- Methods inherited from dotsDrawableVertices
self dotsDrawableVertices ()
 Constructor takes no arguments.
 
 delete (self)
 Release OpenGL resources. More...
 
 set_x (self, x)
 Keep track of required buffer updates.
 
 set_y (self, y)
 Keep track of required buffer updates.
 
 set_z (self, z)
 Keep track of required buffer updates.
 
 set_indices (self, indices)
 Keep track of required buffer updates.
 
 set_colors (self, colors)
 Keep track of required buffer updates.
 
 set_isColorByVertexGroup (self, isColorByVertexGroup)
 Keep track of required buffer updates.
 
nVertices getNVertices (self)
 Calculate number of vertices from x, y, and z.
 
 prepareToDrawInWindow (self)
 Create fresh OpenGL buffer objects.
 
 draw (self)
 Draw vertices from OpenGL buffer objects.
 
- Methods inherited from dotsDrawable
self dotsDrawable ()
 Constructor takes no arguments.
 
 prepareToDrawInWindow (self)
 Do any pre-draw setup that requires an OpenGL drawing window.
 
 mayDrawNow (self)
 Draw() or not, depending on isVisible and possibly other factors.
 
 draw (self)
 Subclass must redefine draw() to draw graphics.
 
 show (self)
 Shorthand to set isVisible=true.
 
 hide (self)
 Shorthand to set isVisible=false.
 

Additional Inherited Members

- Protected Methods inherited from dotsDrawableVertices
 deleteBuffers (self)
 Release OpenGL buffer handles and memory.
 
 updateBuffers (self)
 Write attribute, color, and index data to buffers, as needed.
 
 deleteAttribBuffer (self)
 Release OpenGL vertex attribute resources.
 
 updateAttribBuffer (self)
 Write new vertex attributes to OpenGL buffer(s).
 
 deleteIndexBuffer (self)
 Release OpenGL vertex index resources.
 
 updateIndexBuffer (self)
 Write new vertex indices to OpenGL buffer(s).
 
 deleteColorBuffer (self)
 Release OpenGL vertex color resources.
 
 updateColorBuffer (self)
 Write new vertex colors to OpenGL buffer(s).
 
groupIndices getVertexGroupIndices (self)
 Get an arbitrary 1-based group index for each vertex.
 
buffer overwriteOrReplaceBuffer (self, oldBuffer, data, target, elementsPerVertex)
 Modify or replace a buffer with new data.
 
 selectBuffers (self)
 Bind buffers for drawing.
 
 deselectBuffers (self)
 Unbind buffers for drawing.
 
 flagAllBuffersAsStale (self)
 Mark all OpenGL buffers as stale.
 
- Static Methods inherited from dotsDrawable
static frameInfo drawFrame (drawables, doClear)
 draw() several drawable objects and show the next Screen frame. More...
 
static ensemble makeEnsemble (name, objects)
 Convenient utility for combining a bunch of drawables into an ensemble. More...
 
static frameInfo drawEnsemble (ensemble, args, prepareFlag, showDuration, pauseDuration)
 Convenient utility for drawing an ensemble either locally or remotely. More...
 

Properties and Events

◆ xCenter

Property xCenter = 0

07/03/2018 jig updated random-number generating syntax to use recommended rng instead of rand

the x-coordinate of the center of the dot field (degrees visual angle, centered)

◆ directionWeights

Property directionWeights = 1

when direction is an array, the relative frequency of each direction (the pdf).

If directionWeights is incomplete, defaults to equal weights.

◆ fieldScale

Property fieldScale = 1.1

fraction of diameter that determines the width of the underlying dot field.

When fieldScale > 1, the underlying dot field will be wider than the aperture.

◆ randBase

Property randBase = sum(clock*10)

If not nan, this value specifies a "NO-VAR" condition that produces the exact sequence of dots for a given coherence and direction (assuming all other properties are constant).

Seed is computed as randBase+coherence+100*direction;

◆ dotsPositions

Property dotsPositions = []

dot positions, active and coherence states, all gathered in a single x-by-y-by-z 3D-matrix.

the x dimension must be 4. First two rows are for x and y normalized positions of each dot, respectively. 3rd row only contains 0 and 1's and there is a 1 whenever the dot is 'active', i.e. displayed on the corresponding frame 4th row only contains 0 and 1's and there is a 1 whenever the dot is 'coherent' on the corresponding frame. the y dimension has length equal to the number of dots, all interleaving frames confounded. Each entry in the y dimension is therefore absolutely referring to a dot

the z dimension encodes frames. So, every time computeNextFrame is called, a new z-slice is filled

◆ recordDotsPositions

Property recordDotsPositions = false

Flag controlling whether to record dots positions or not Note, this doesn't record any time stamp.

◆ nDots

Property nDots
protected

number of dots in the kinetogram, includes all interleaving frames.

◆ normalizedXY

Property normalizedXY
protected

2xn matrix of dot xCenter and yCenter coordinates

In normalized units, from top-left of kinetogram.


The documentation for this class was generated from the following file: