Created
September 18, 2015 15:44
-
-
Save milligramme/7e0ab9d37b6b21259323 to your computer and use it in GitHub Desktop.
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
| 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