Showing posts with label Research_P1. Show all posts
Showing posts with label Research_P1. Show all posts

Wednesday, 28 March 2012

QUICK RESEARCH ON GOLDEN RATIO

Quick definition : if the ratio of the sum of the quantities to the larger quantity is equal to the ratio of the larger quantity to the smaller one. The figure on the right illustrates the geometric relationship. Expressed in algebra :


















Some examples on golden ratio :
A very popular applied golden ratio by Leonardo da Vinci's - Vitruvian Man
Golden ratio on human anatomy
  More visualized golden ratio :

THE GOLDEN RATIO = 1.61803399

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
---------------------------------------------------------------------------------------------------------------