For some reason, the arc depends on closeShape = True/False
I adapted your code to adapt for mouse location and while experimenting with code I realize setting closeShape to different values give different results.
When closeShape = True, it looks like:
When closeShape = False, it looks like:
Here is the complete code
#initialise screen and mouse
display = (1000, 700)
# creates a window
myWin = visual.Window(color='grey', units='pix', size=display, monitor='testMonitor',
allowGUI=False, fullscr=False, pos = (0, 0))
mouse = Mouse(visible=True)
# parameters to draw on gui
center = (0, 0) # position of the circle
r = 150 # radius, in whatever units the window uses
# helper function
model_circle = visual.ShapeStim(myWin, vertices=100, pos=(0, 0), size=(r*2, r*2), units="pix", fillColor="blue", lineColor="blue", opacity=1, interpolate=True, autoDraw=False)
propLineWidth = 20/r
ogCircleVerts = model_circle.vertices
def produce_vertices(ogCircleVerts, bucket_size, location_x, location_y):
location_radians = math.atan2(location_y, location_x)
location_degrees = np.rad2deg(location_radians)
bucket_range = [location_degrees - bucket_size/2, location_degrees + bucket_size/2]
verts = ogCircleVerts[int(bucket_range[0]):int(bucket_range[1])]
print (verts)
return np.array([verts, verts * (1 - 40/r)])
circle = visual.ShapeStim(myWin, vertices="circle", pos=(0, 0), size=(r*2, r*2), units="pix", fillColor="blue", lineColor="blue", opacity=1, interpolate=True, autoDraw=True)
circle.vertices = [circle.vertices, circle.vertices * (1 - propLineWidth)]
# Draw bucket
vertices_arc = produce_vertices(ogCircleVerts, 30, 150, 90)
bucket = visual.ShapeStim(myWin, vertices=vertices_arc, pos=(0, 0), size=(r*2, r*2), units="pix", fillColor="gold", lineColor="gold", opacity=1, interpolate=True, autoDraw=True)
bucket.closeShape = False
I am not overly familar with the source code so I dont quite know why it is happening…