Tuesday, 20 March 2012

Progress1

Ok so i've been moving on the idea of some sort of surreal pattern moving through the sky. So what i've done so far is make a simple sin curve as  path across the window, and then i've been trying to find a way to have a form move along that path, while having a path of its own (eg more sin curves).

Basically figured out how it works with this kind of thing:

def draw():
  
    for i in range(50):
       
        noStroke()
        fill(0,0,0,10)
        rect(0,0,600,600)
        fill (200,255,255,5)
        x = frameCount*5 + i
        y = thefunction(x) + 200
        z = (20 * math.pow(1/2. * math.sin (20*x) + 1/2., 2) + 20*math.pow(1/2. * math.sin (20*x) + 1/2., 2)) * math.sin(5*6.28*x)
        q = (20 * math.pow(1/2. * math.sin (20*x) + 1/2., 2) + 20*math.pow(1/2. * math.sin (20*x) + 1/2., 2))  * math.sin(5*6.28*x)

        y1 = y + z
        y2 = y + q
        for i in range (10):
            y1 = y1 + 2
            y2 = y2 + 2
            ellipse(x,y1,50,50)





          

No comments:

Post a Comment