I need to set up an analog clock, with an arrow-shaped pointer that will go through a circular path (clockwise) and that full revolution will last 24 seconds, that is, it will be 8 steps,and each stop should last 3 seconds. The pointer will start at 270º. I know that my code is still very poor, I need some help to understand how to configure the steps that will give the clock movement.
import math, numpy, random #to have handy system and math functions from psychopy import core, event, visual, gui #these are the PsychoPy modules #creates a window myWin = visual.Window(color = 'white', units = 'pix', size = [800, 800], allowGUI = False, fullscr = False) #Drawclock disk = visual.Circle(myWin, radius = 80, fillColor = 'gray', lineColor = None) #Drawclock_hand clock_hand = visual.Line(myWin, start = [0,0], end = [-80, 0], lineColor = 'black', lineWidth = 3, ori = 0) #Here I need help! for angle in range(0, 360, 45): angleR = math.radians(angle) x =math.cos(angleR) * radius y =math.sin(angleR) * radius clock_hand.setPos([x,y]) clock_hand.draw() disk.draw() myWin.flip() core.wait(5) #waits for 5 seconds myWin.close() #closes the window exit()