I do not know how to determine the top of the needle of the clock. If you determine the coordinates of them, I can think of the time of the clock.
Please help me solve this problem. Thank you very much!
I do not know how to determine the top of the needle of the clock. If you determine the coordinates of them, I can think of the time of the clock.
Please help me solve this problem. Thank you very much!
Test points in a circle of radius M, around the centre of the clock. (You could use a for loop to vary the angle from -pi to pi.)
First set M so that the long hand will touch the circle but not the short hand. You will find a region of black points and these reveal the angle of the long hand.
Then repeat with smaller M, so your circle will cross both hands. If you identify two different black areas, you can decide which one is the long hand due to the previous step. (But if the hands are overlapping you may not see two different areas.)