Created
May 21, 2012 22:32
-
-
Save companje/2765118 to your computer and use it in GitHub Desktop.
Fibonacci Spiral in Processing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float phi = (sqrt(5)+1)/2; | |
size(323,200); | |
translate(height/phi,0); | |
scale(height); | |
noStroke(); | |
smooth(); | |
for (float i=0; i<10; i++) { | |
fill(i/10*255); | |
rect(0,0,1,1); | |
fill(255,255,0,150); | |
arc(0,0,2,2,0,PI/2); | |
scale(1/phi); | |
rotate(PI/2); | |
translate(1/phi,0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment