# Arup Guha
# 4/23/2016
# Donald Goes in Circles

import random
import math
import time
import pygame, sys
from pygame.locals import *

pygame.init()
DISPLAYSURF = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("Donald Going Around in Circles")
WHITE = pygame.Color(255,255,255)
BLUE = pygame.Color(0,0,255)
clock = pygame.time.Clock()

donald = pygame.image.load("donald.jpg")
centerX = 200
centerY = 250
radius = 250
angle = 0

curT = time.clock()

while True:
    
    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()    
     
    DISPLAYSURF.fill(WHITE)
    donaldX = centerX + radius*math.cos(angle)
    donaldY = centerY + radius*math.sin(angle)
    DISPLAYSURF.blit(donald,(donaldX, donaldY))

    pygame.display.update()

    # Move the drops for the next iteration and remove useless ones.
    clock.tick(30)
    angle = angle + 2*math.pi/100;
