Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x = 0;
- int y = -10;
- int z = 15;
- void setup() {
- size(800, 800);
- }
- void draw() {
- background(255);
- drawEllipse();
- y = (y) % width;
- x = (x) % width;
- z = (z) % width;
- }
- void drawEllipse() {
- fill(255, 0, 0);
- ellipse(400, x, 150, 150);
- //Left Eye
- fill(255);
- ellipse(370, y, 15, 12);
- fill(0);
- ellipse(370, y, 6, 8);
- //Right Eye
- fill(255);
- ellipse(430, y, 15, 12);
- fill(0);
- ellipse(430, y, 6, 8);
- //Mouth
- noFill();
- arc(400, z, 60, 30, 0, PI);
- //Nose
- arc(400, z-10, 10, 10, 0, PI);
- //Eyebrows
- arc(370, z-40, 20, 5, PI+QUARTER_PI, TWO_PI);
- arc(430, z-40, 20, 5, PI+QUARTER_PI, TWO_PI);
- //Speed
- x= x+3;
- y= y+3;
- z= z+3;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement