I got inspired by the picture of exercise 1 in lecture.... the golden ratio
For exercise 1, I did try to create one and here's the result
I made it more complicated and somehow made viewers illusive.
CODE :
---------------------------------------------------------------------------------------------------------------
import math
def setup():
size(600,600)
background(255)
stroke(0)
smooth()
def Xfunction(z):
return 300.*math.cos(1.6180339887*z)
def Yfunction(z):
return 300.*math.sin(3.14*z)
def draw():
lx = Xfunction(0.) + 300
ly = Yfunction(0.) + 300
for i in range(1, 600.):
z = i / 10.
x = Xfunction(z) + 300
y = Yfunction(z) + 300
line(lx, ly, x, y)
line(ly, lx, y, x)
lx = x
ly = y
---------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment