Assignment 1 Drawing Machine

This drawing is called “Fly Away Kitty.” It features a blue background with a large pixelated cat held up by three balloons. In the background there are white clouds, a yellow sun, and an airplane flying across the X horizon. When the viewer presses the mouse down, a red heart will appear.  It is a moving picture; the cat and the balloons float up and down.

I drew inspiration from the video game titled “Minecraft” and the Disney movie titled “Up”. When put together, a pixelated video game aura is created.

-Bola

PImage cat;
PImage plane;
float x = 0;
int rise = 1;
float speed = 1;
int i = 0;

void setup() {
size(600, 600);
cat = loadImage(“cutecat.png”);
plane = loadImage(“plane.png”);
plane.resize(75, 50);
smooth();
}

void draw() {
background(100, 200, 250);
stroke(255);
fill(255);
rect(25, 25, 25, 25);
rect(50, 25, 25, 25);
rect(75, 25, 25, 25);
rect(50, 0, 25, 25);
//cloud 1
rect(150, 75, 25, 25);
rect(175, 75, 25, 25);
rect(200, 75, 25, 25);
rect(175, 50, 25, 25);
//cloud 2
rect(300, 250, 25, 25);
rect(325, 250, 25, 25);
rect(350, 250, 25, 25);
rect(325, 225, 25, 25);
//cloud 3
rect(25, 350, 25, 25);
rect(50, 350, 25, 25);
rect(75, 350, 25, 25);
rect(50, 325, 25, 25);
//cloud 4
rect(500,450,25,25);
rect(525,450,25,25);
rect(550,450,25,25);
rect(525,425,25,25);
//cloud 5
stroke(0);
fill(#EDF202);
ellipse(500, 75, 100, 100);
//sun

image(plane, x, 50);

translate(0, -i); // translate cat + balloon
image(cat, 175,250);
stroke(0);
fill(0, 0, 255);
ellipse(200, 200, 50, 50);
line(300, 290, 200, 225);
fill(255, 200, 200);
ellipse(350, 175, 50, 50);
line(300, 290, 350, 200);
fill(0, 255, 0);
ellipse(300, 100, 50, 50);
line(300, 290, 300, 125);
move();

if (mousePressed == true) {
pushMatrix();
translate(mouseX, mouseY);
fill(255);
stroke(255);
smooth();
noStroke();
fill(255, 0, 0);
beginShape();
vertex(50, 15);
bezierVertex(50, -5, 90, 5, 50, 40);
vertex(50, 15);
bezierVertex(50, -5, 10, 5, 50, 40);
endShape();
popMatrix();
//press down for heart
}
}

void move() {
x = x + speed;
i = i + rise;
if (x > width) {
x = 0;
}
if (i >= 20 || i <= 0) {
rise = rise * -1;
}
println(i);
frameRate(15); // speed of movement
}