# transform4.py
from Processing import *
from grid import grid
from math import sin

window(500, 500)
rectMode(CENTER)

size = 1.0
time = 0.0
def draw(o, e):
    global size, time
    background(255)

    pushMatrix()

    translate(250, 250)
    scale( size )

    noFill()
    rect(0, 0, 100, 50)

    popMatrix()

    time += 0.05
    size = sin(time) + 1


frameRate(30)
onLoop += draw
loop()