Skip to content

Instantly share code, notes, and snippets.

@milligramme
Created September 18, 2015 15:44
Show Gist options
  • Select an option

  • Save milligramme/7e0ab9d37b6b21259323 to your computer and use it in GitHub Desktop.

Select an option

Save milligramme/7e0ab9d37b6b21259323 to your computer and use it in GitHub Desktop.
int r = 124;
float sx, sy;
void setup() {
size(screen.width, screen.height);
frameRate(90);
}
void draw() {
//background(255);
stroke(7);
line(0, height/2, width, height/2);
line(width/2, 0, width/2, height);
sx = width/2 + r*sin(radians(frameCount%360));
sy = height/2 + r*cos(radians(1.2*frameCount%360));
pushMatrix();
translate(sx, sy);
ellipse(0,0,20,20);
popMatrix();
translate(sx+39*sin(radians(3.1*frameCount%360)), sy+139*cos(radians(0.5*frameCount%360)));
ellipse(0,0,10,10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment