-
-
Save jkwok91/3ce30f587d0a4783f658 to your computer and use it in GitHub Desktop.
is this a fractal i still don't know
This file contains 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
/* | |
fractal(?) 0 | |
in which i use recursion to make things happen | |
april 17, 2014 | |
*/ | |
float w; | |
void setup() { | |
size(300,300); | |
background(0); | |
stroke(color(255,0,0)); | |
noFill(); | |
w = width-1; | |
noLoop(); | |
} | |
void draw() { | |
if (w > 10) { | |
rect(0,0,w,w); | |
w = 3*w/4; | |
translate(w,w); | |
rotate(PI); | |
draw(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment