# Lissagloop pattern generator
# Written in Pygame by Erik Nelson, (c) July 2007
# essentially draws Lissajous patterns while also
# modulating the color and the pen size
import pygame
from pygame.locals import *
from math import *
pygame.init()
screen = pygame.display.set_mode((640,480))
pygame.display.set_caption("Lissagloop")
i=0
color = ( 250,0,0 )
playing =1
while playing ==1:
for event in pygame.event.get():
if event.type == QUIT:
playing = 0
point = ( int((300* sin(i*.01)) + 320),
int((230*sin(i*.0121)) + 240 ))
color= ( int( 128 + 128 * sin(i*.001) ),
int( 128 + 128 * sin(i*.0012) ),
int( 128 + 128 * sin(i*.0013) ) )
size = int( 20 + 20 * sin(i*.0014) )
pygame.draw.circle(screen, color, point, size,size)
pygame.display.update()
print color
i += 1
               (
geocities.com/eriknelson2002)