Так можно добраться до визуализации молекул...)))
import pygame
import random
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("")
state = 0
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
pygame.image.save(win, "image.jpg")
if (state == 0):
win.fill((0,0,0))
state = 1
for circleY in range(50,450,50):
for circleX in range(50,450,50):
pygame.draw.circle(win, (255,255,255), (circleY,circleX),15)
pygame.draw.line(win, (255,255,255), [circleX, circleX], [circleX, circleY], 3)
pygame.display.update()
pygame.quit()
|