#!/bin/python
import pygame, sys
import random
import math
green = (0, 255, 0)
blue = (0, 0, 128)
red = (255, 0, 0)
pygame.init()
sc = pygame.display.set_mode((500, 500))
pygame.display.set_caption("Давай пульсарить на pygame")
x0 = 250
y0 = 250
r = 150
while True:
sc.fill((125,125,125))
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
for a in range(0,360,5):
x1 = x0 + r * math.cos(a)
y1 = y0 + r * math.sin(a)
pygame.draw.circle(sc, green, (int(x1), int(y1)), 5)
r = r - 1
if r == 10:
r = 150
pygame.display.flip()
|