Luck & Vogel (1997)-like task?

Ben Robinson BRobinso at mprc.umaryland.edu
Mon Sep 24 15:36:25 UTC 2007


there's no way to avoid randomizing the x and y axis values, but there should be no need for comparison and rerandomization.
rather than randomize to the whole screen, divide the screen into 8 non-overlapping regions, perhaps around the circumference of an imaginary circle, perhaps not.  make sure that there's enough of a gap between your regions that if your shape is drawn all the way on the edge of one region it won't be covering up some of the space in the region next to it.  that means, if your shapes are 20 pixels wide, make sure there are at least 20 unused pixels between regions.

dim x0,x1,x2,x3,x4,x5,x6,x7 as integer
dim y0,y1,y2,y3,y4,y5,y6,y7 as integer

x0 = random(region0left, region0right)
y0 = random(region0top, region0bottom)

etc.

then i can think of two ways to use these x and y axis values.

if you are using canvas.draw you would calculate the x's and y's at the beginning of each trial.

if you wanted to, instead, use a list object, before the start of your block place an inline object with a For loop in it:

For i = 1 to ListObject.Size
    x0 = random(region0left, region0right)
    y0 = random(region0top, region0bottom)
    etc.
    ListObject.SetAttrib i, "x0", x0
    ListObject.SetAttrib i, "y0", y0
    etc.
Next i
ListObject.Reset

in your trial procedure just place a slide object with 8 different TextObjects.  have the x and y axis for your text object pull from the [x0] and [y0] columns on your list.

i hope this makes sense.  it's not that difficult, but it's also not that easy to describe in a succinct manner.

ben robinson

>>> Alex Francis <francisa at purdue.edu> 9/21/2007 12:51 PM >>>

Greetings,
I need to present a task similar to one used by Luck & Vogel (1997, 
"The capacity of visual working memory for features and 
conjunctions", Nature 390) in which, on each trial, 8 distinct 
(non-overlapping) color patches are presented at random locations on 
the screen.

I can come up with a brute-force way to do this in eprime, 
randomizing X- and Y-axis frame location values, but the amount of 
randomization, comparison and re-randomization seems prohibitive for 
8 squares (and there is an obvious possibility of getting stuck in an 
infinite loop).

Does anyone out there either have such a script I could copy that 
already does this, or a suggestion of a more elegant and foolproof 
way to place objects randomly on the screen without having any of them overlap?

Thanks in advance,

-alex


   Alexander L. Francis         http://web.ics.purdue.edu/~francisa 
   Assistant Professor                          francisA at purdue.edu 
   Speech, Language & Hearing Sciences       ofc. +1 (765) 494-3815
   Purdue University                         lab. +1 (765) 494-7553
   500 Oval Drive                            fax. +1 (765) 494-0771
   West Lafayette IN 47907-2038
   USA



More information about the Eprime mailing list