the width and height of circle are always the same--the radius because tkinter canvas ( ,ycoordinates start at ( , in the upper-left cornerthe plotter gui must offset the circle' center point to coordinates (width/ width/ )--the origin point from which lines are drawn for instancein circlethe canvas center is ( , line to the -degree angle point on the right side of the circle runs from ( , to ( , )--the result of adding the ( , point coordinates plotted for the radius and angle line to the bottom at degrees runs from ( , to ( , after factoring in the ( ,- point plotted this point-plotting algorithm used by plotterguialong with few scaling constantsis at the heart of the pyclock analog display if this still seems bit muchi suggest you focus on the pyclock script' digital display implementation firstthe analog geometry plots are really just extensions of underlying timing mechanisms used for both display modes in factthe clock itself is structured as generic frame object that embeds digital and analog display objects and dispatches time change and resize events to both in the same way the analog display is an attached canvas that knows how to draw circlesbut the digital object is simply an attached frame with labels to show time components running pyclock apart from the circle geometry bitthe rest of pyclock is straightforward it simply draws clock face to represent the current time and uses widget after methods to wake itself up times per second to check whether the system time has rolled over to the next second on second rolloversthe analog secondminuteand hour hands are redrawn to reflect the new time (or the text of the digital display' labels is changedin terms of gui constructionthe analog display is etched out on canvasredrawn whenever the window is resizedand changes to digital format upon request pyclock also puts python' standard time module into service to fetch and convert system time information as needed for clock in briefthe ontimer method gets system time with time timea built-in tool that returns floating-point number giving seconds since the epoch--the point from which your computer counts time the time local time call is then used to convert epoch time into tuple that contains hourminuteand second valuessee the script and python library manual for additional details checking the system time times per second may seem intensebut it guarantees that the second hand ticks when it shouldwithout jerks or skips (after events aren' precisely timedit is not significant cpu drain on systems use on linux and windowspyclock uses negligible processor resources--what it does use is spent largely on screen updates in analog display modenot on after events ss ss the pydemos script of the preceding for instancelaunches seven clocks that run in the same processand all update smoothly on my (relatively slowwindows netbook laptop they together consume low single-digit percentage of the cpu' bandwidthand often less than the task manager pyclockan analog/digital clock widget