Skip to content

Instantly share code, notes, and snippets.

@ayseglass
Created April 30, 2016 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayseglass/5a62961bceb06b4a48f10220f674ef74 to your computer and use it in GitHub Desktop.
Save ayseglass/5a62961bceb06b4a48f10220f674ef74 to your computer and use it in GitHub Desktop.
Roman'ın resminin üstündeki kardan adam
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