Last active
July 20, 2018 07:44
-
-
Save hapo31/e94d17a3641ea05896fd23a40926eeca to your computer and use it in GitHub Desktop.
void_setup
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
void setup() { | |
size(400, 400); | |
} | |
float a = 0; | |
void draw() { | |
fill(#012050, 5); | |
rect(0, 0, width, height); | |
translate(200+a*10,200+a*10); | |
rotate(a); | |
scale(a/15); | |
a += 0.05; | |
kao(0, -50); | |
kao(1, 50); | |
if (a > 30) a -= 50; | |
} | |
void kao(int don, float b) { | |
stroke(0); | |
strokeWeight(2); | |
fill(#e7eedd); | |
ellipse(b, 0, 50, 50); | |
noStroke(); | |
fill(#68c0c0 + #8f8768 * don); | |
ellipse(b, 0, 38, 38); | |
stroke(0); | |
strokeWeight(1.4); | |
arc(b + 4.26, 5, 8.5, 7.3, 0.3, PI, OPEN); | |
arc(b - 4.26, 5, 8.5, 7.3, 0, PI - 0.3, OPEN); | |
fill(0); | |
ellipse(b - 11, -2, 6.56, 7); | |
ellipse(b + 11, -2, 6.56, 7); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment