![]() ![]() Thanks a lot for looking into such a detailed solution! # draw the first N blocks (rest are skipped) Np.random.shuffle(blocks) # so that the ones drawn get randomised ThisBox = visual.Rect(win, size=blockSize) # we'll set pos each frame #create a list of blocks (can be shuffled) 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? But is there a way to use this method or any other one you can think of which would accomplish this? I could make another long loop with each box against the others. I would need to test whether any of the objects overlap with any of the others not just the previous one. I was hoping to use the “overlaps” method however it only takes a single input. ![]() 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. 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. I’m building an experiment (version of the corsi block), which draws n squares on the screen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |