Created
November 9, 2015 16:04
-
-
Save mrkev/49043a5d42f1342b3359 to your computer and use it in GitHub Desktop.
Experiment
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
int SWID = 1440; | |
int SHEI = 720; | |
void setup () { | |
size(SWID, SHEI); | |
background(255,255,255); | |
} | |
void drawCircle (int cx, int cy, int rd, int res) { | |
pushMatrix(); | |
translate(cx, cy); | |
int r = rd; | |
for (float t = 0; t < Math.PI * 2; t += Math.PI / res) { | |
float x = (float) (r * Math.cos(t)); | |
float y = (float) (r * Math.sin(t)); | |
ellipse(x, y, 7, 3); | |
} | |
popMatrix(); | |
} | |
int frame = 0; | |
void draw() { | |
frame++; | |
drawCircle(SWID / 2, SHEI / 2, frame, frame); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment