I’m building an experiment (version of the corsi block), which draws n squares on the screen. This is accomplished by looping the visual.shapeStim into a list of items called my_box so that I can access its properties later (e.g.
my_box.lineColor = ...). An important feature of course is that the boxes do not overlap but since they are plotted on the screen randomly for each iteration, I need to check the coordinates all the time.
I was hoping to use the “overlaps” method however it only takes a single input.
I would need to test whether any of the objects overlap with any of the others; not just the previous one. I could make another long loop with each box against the others. But is there a way to use this method or any other one you can think of which would accomplish this?
Maybe also with an additional buffer zone so that blocks aren’t too close to each other? Or is there a way to generate random coordinates in a way that they are not too close to each other and so handle the problem before it even gets to the object stage?
Thanks for the help and advice.