# pushpop1.py
from Processing import *

window(500, 500)

# Translate the origin of the coordinate system
# to the center of the sketch window
translate(250, 250)

# Rotate and draw a line and ellipse
def draw(o, e):
    pushMatrix()
    rotate( radians(5) )
    line(0, 0, 100, 0)          # Drawing args are constant
    ellipse( 100, 0, 10, 10)
    popMatrix()

# Draw again on mouse pressed
onMousePressed += draw