#!/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")
while True:
sc.fill((125,125,125))
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.circle(sc, red, (250, 250), 50)
r = 0
for z in range(0,10):
for i in range(0,10):
r = r + z
x1=250+r*math.cos(i+250)
y1=250+r*math.sin(i+250)
x2=250+r*math.cos(i+200)
y2=250+r*math.sin(i+200)
pygame.draw.line(sc, (255, 255, 255),[x1,y1], [x2, y2], 3)
pygame.display.flip()
pygame.image.save(sc, "image.png")
|