Hello I had a number of Topics on the subject, but could not figure out from the help how to proceed with the experiment.!
I wrote a very simple code, based on the “Button” component. In result, when you click on the button component with the mouse, more and more pologons are added to each frame.:
Polygons = 
polygon = visual.ShapeStim(
vertices=[[-(0.1, 0.1)/2.0,-(0.1, 0.1)/2.0], [+(0.1, 0.1)/2.0,-(0.1, 0.1)/2.0], [0,(0.1, 0.1)/2.0]],
ori=0.0, pos=(-random()+random(), -random()+random()),
lineWidth=1.0, colorSpace=‘rgb’, lineColor=‘white’, fillColor=‘white’,
opacity=None, depth=0.0, interpolate=True)
and inside the Button component
The result of the code is:
I only have two critical points missing:
- I want the polygons to be added only if they do not overlap (use the overlap command)
I tried used this code, but it does not seem to me that this is the way:
if polygon.overlaps(polygon) == True:
- No information was recorded about the experiment in the output file, nor the number of clicks, nor the duration of the click, nor the number of polygons added.
I would like to receive guidance on these two questions, thank you very much!