Still applied sin, cos wave and golden ratio... Test out lots of outcomes
Here I tried with shape like circle, no lines any more.
Comment : keep the grey and white colours. Changed the shape into circle, applied sin, cos and golden ratio
The outcome is look liked a spiral wave or a tornado, so cool then.
CODE :
---------------------------------------------------------------------------------------------------------------
import math
def setup():
size(600,600)
background(150)
stroke(255)
smooth()
def draw():
background(150)
for i in range(1,500,20):
angle = mouseY * i * 0.001
x = i * 1.61803399 * math.sin(angle)
y = i * 1.61803399 * math.cos(angle)
width = 0.00001
ellipse(300+x, 300+y, width+i, width+i)
---------------------------------------------------------------------------------------------------------------
Make the circles appear more frequently
CODE :
---------------------------------------------------------------------------------------------------------------
import math
def setup():
size(600,600)
background(150)
stroke(255)
smooth()
def draw():
background(150)
for i in range(1,500,2):
angle = mouseY * i * 0.001
x = i * 1.61803399 * math.sin(angle)
y = i * 1.61803399 * math.cos(angle)
width = math.pow(2, -10)
ellipse(300+x, 300+y, width+i, width+i)
---------------------------------------------------------------------------------------------------------------
Different colours fill and stroke.... FOR THE EXPERIENCE!
Comment : The result is flexible, contrast and amazing. I love it! But still the long way to my final
CODE :
---------------------------------------------------------------------------------------------------------------
import math
def setup():
size(600,600)
background(150)
stroke(255)
smooth()
def draw():
background(150)
for i in range(1,500,2):
angle = mouseY * i * 0.001
x = i * 1.61803399 * math.sin(angle)
y = i * 1.61803399 * math.cos(angle)
width = math.pow(2, -10)
fill(255,0,0,50)
ellipse(300+x, 300+y, width+i, width+i)
---------------------------------------------------------------------------------------------------------------
Tried frameRate function to smoother the animation, use 2PI formula to get some interesting results.
Also why not testing with interacting with 2 axis of mouse coordinate.
Comment : kind of pleasant result, more flexible but I felt like it lacks of something, a little bit blankly. Also tried distinguish the functions for more effects with if... etc
CODE :
---------------------------------------------------------------------------------------------------------------
import math
def setup():
size(600,600)
background(150)
stroke(255)
smooth()
frameRate(1000000)
def draw():
background(150)
for i in range(1,500,1):
angle = mouseX * i * 0.01
x = i * 6.28 * math.sin(angle)
y = i * 6.28 * math.cos(angle)
width = math.pow(2, -100)
fill(255,0,0,50)
if mouseX<300 :
ellipse(mouseX+x, mouseY+y, width+i, width+i)
else :
ellipse(mouseY+x, mouseX+y, width+i, width+i)
---------------------------------------------------------------------------------------------------------------
More developments' coming
Comment : I watch and learn to make a list in http://www.khanacademy.org/science/computer-science/v/python-lists. So I tried it out right away, but where can I put it in?! I tested with the colours and also used random function to get more variable on colours. The only problems was the colours changing process too fast. Also I referenced the colours palette from kuler.com
Link here & shot : http://kuler.adobe.com/#themes/search?term=userId%3A701264
CODE I USED :
---------------------------------------------------------------------------------------------------------------
import math
def setup():
size(600,600)
stroke(255)
smooth()
colors = range(5)
colors[0] = color(10,58,74)
colors[1] = color(25,106,115)
colors[2] = color(50,166,166)
colors[3] = color(161, 191, 51)
colors[4] = color(200,217,74)
def draw():
background(50,166,166)
for i in range(1,500,1):
angle = mouseX * i * 0.01
x = i * 6.28 * math.sin(angle)
y = i * 6.28 * math.cos(angle)
width = math.pow(2, -100)
rf = (colors[int(random(0,4))])
fill(rf)
if mouseX<300 :
ellipse(mouseX+x, mouseY+y, width+i, width+i)
else :
ellipse(mouseY+x, mouseX+y, width+i, width+i)
---------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment