Hi everyone,
I have a specific problem I hope you will help me with. I am running an experiment using eyetracking. In each trial (84 trials in total) I have to present 40 images, 100×100 pixels each, 20 on the right side of the screen, 20 on the left, simultaneously. The screen has a 1600×1200 pixels resolution.
I am trying to generate a random vector of coordinates of x and y which adheres the following conditions:
Each randomly generated x and y location coordinate pair must ensure the image presented is equidistant by 50 pixels from the next. This means that all the images displayed on screen, all 40 of them, must have at least 50 pixels distance from each other. So if on of the image location pairs is x = 1 and y = 1, the other x and y pairs must not have a value within x + 100(image pixel number) + 50 (distance between images) = 151, and y + 100(image pixel number) + 50 (distance between images) = 151. Each trial must have coordinate/location x and y numbers for all 40 images that adhere to these rules.
I am sorry this is so wordy. Can anyone please help?
All the best and thanks, Dritan
Best Answer