Skip to content

Instantly share code, notes, and snippets.

@mrkev
Created November 9, 2015 16:04
Show Gist options
  • Save mrkev/49043a5d42f1342b3359 to your computer and use it in GitHub Desktop.
Save mrkev/49043a5d42f1342b3359 to your computer and use it in GitHub Desktop.
Experiment
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