Created
April 30, 2016 17:56
-
-
Save ayseglass/5a62961bceb06b4a48f10220f674ef74 to your computer and use it in GitHub Desktop.
Roman'ın resminin üstündeki kardan adam
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
color m = color (255, 255, 255); | |
color e = color (53, 111, 169); | |
color r= color(218, 0, 65); | |
int x= 0; | |
PImage bg; | |
void setup() { | |
size(500, 318); | |
} | |
void draw() { | |
bg = loadImage("roman.jpg"); | |
background(bg); | |
move(); | |
snowman(); | |
//saveFrame("resim###.jpg"); | |
} | |
void move() { | |
x=x+1; | |
if (x > width) { | |
x=0; | |
} | |
} | |
void snowman() { | |
fill(m); | |
ellipse(mouseX+x, mouseY, 25, 25); //head | |
ellipse(mouseX+x, mouseY+37, 50, 50); | |
ellipse(mouseX+x, mouseY+100, 75, 75); | |
fill(e); | |
ellipse(mouseX+x-1, mouseY-1, 3, 3);//eyes | |
ellipse(mouseX+x+2, mouseY-1, 3, 3); //eyes | |
fill(0); | |
ellipse(mouseX+x+0.5, mouseY+3, 1, 1); //nose | |
fill(r); | |
rect(mouseX+x-2, mouseY+6, 6, 1); //mouth | |
fill(0); | |
rect(mouseX+x-17, mouseY-10, 35, 2); //hat | |
rect(mouseX+x-10, mouseY-17, 20, 10); //hat | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment