title: How to find x,y coordinates of a circle in Pygame
body: <p>I am currently trying to create a digital speedometer. The project has come to a screeching halt due to the problem encountered when trying to control the dial. My variable <em>radial_pos</em> is intended to calculate the exact x,y coordinates of each tick of the speedometer and if the user presses <em>K_UP</em>, <em>radial_pos</em> will increase by 1 to show the next tick of the speedometer. However, I'm afraid its been too many years since I've learned the concept of finding the coordinates of a circle, let alone understand it enough to be able to increment it accordingly. Here is my code so far:</p>
  
  <pre><code>import pygame, sys
  from pygame.locals import *
  
  pygame.init()
  
  #Screen Resolution
  width = 1080 
  height = 720
  
  #Instrument Characteristics
  color = (255,255,255)
  background = (0,0,0)
  
  radius_speedometer = 100
  weight_speedometer = radius_speedometer-5
  
  #Window Measurements
  screen= pygame.display.set_mode((width,height),0,32)
  pos_center_x = width/2
  pos_center_y = height/2
  
  #Speedometer Dial Position
  pos_speedometer_dial_x = pos_center_x - 60
  pos_speedometer_dial_y = pos_center_y +60
  
  #Radial Position (hint: ticks on the clock)
  '''
  radial_pos = ...
  '''
  
  while True:
      for event in pygame.event.get():
          if event.type==QUIT:
              pygame.quit()
              sys.exit()
  
          if event.type==KEYDOWN:
              if event.key==K_DOWN:
                  radial_pos=-1
              if event.key==K_UP:
                  radial_pos=+1
  
          if event.type==KEYUP:
              if event.key==K_DOWN:
                  radial_pos=0
              if event.key==K_UP:
                  radial_pos=0
  
      screen.lock()
  
      #Speedometer Ring
      pygame.draw.circle(screen, color, (pos_center_x,pos_center_y),      radius_speedometer)
      pygame.draw.circle(screen, background, (pos_center_x,pos_center_y), weight_speedometer)
  
      #Speedometer Dial
      pygame.draw.line(screen, color, (pos_center_x,pos_center_y), (pos_speedometer_dial_x, pos_speedometer_dial_y),5)
  
      screen.unlock()
  
      pygame.display.update()
  </code></pre>
  
  <p>If anyone has any advice for this particular issue, it would greatly appreciated. Thank you for your time.</p>