Wednesday, July 4, 2012

Assignment# 7

Here's my monster! It's a mix between a cat, a rabbit, and a little bit of a fox.



/*
Rieev Princer
3 July 2012
Assignment #7: Animal/Monster
A mix of a rabbit, a cat, and a fox.*/

void setup (){

size(500,500);
smooth();
noCursor();
}

void draw(){
background (255,162,234);
PImage b;
b = loadImage("glitter.jpg");
background(b);
//body
stroke(255);
fill(255,255,255);
ellipse(mouseX,mouseY+155,88,70);
triangle(mouseX-40,mouseY+155,mouseX,mouseY,mouseX+40,mouseY+155);

//legs
stroke(255);
fill(255,255,255);
ellipse(mouseX+10,mouseY+160,30,80);
ellipse(mouseX-10,mouseY+160,30,80);
ellipse(mouseX+10,mouseY+170,84,20);
ellipse(mouseX-10,mouseY+170,84,20);

//ears
stroke(255);
fill(255,255,255);
triangle(mouseX-45,mouseY-15,mouseX-25,mouseY-75,mouseX+18,mouseY-10);
triangle(mouseX+45,mouseY-15,mouseX+25,mouseY-75,mouseX-18,mouseY-10);

//InsideEars
stroke(255);
fill(255,162,234);
triangle(mouseX-35,mouseY-10,mouseX-25,mouseY-55,mouseX+10,mouseY-10);
triangle(mouseX+35,mouseY-10,mouseX+25,mouseY-55,mouseX-10,mouseY-10);

//Rabbit
stroke(255);
fill(255);
beginShape();
curveVertex(mouseX+45,  mouseY+95);
curveVertex(mouseX+90,  mouseY+108);
curveVertex(mouseX+68,  mouseY+19);
curveVertex(mouseX+45, mouseY-15);
curveVertex(mouseX+32, mouseY+120);
curveVertex(mouseX+45, mouseY+15);
endShape();
stroke(255);
fill(255);
beginShape();
curveVertex(mouseX-45,  mouseY+95);
curveVertex(mouseX-90,  mouseY+108);
curveVertex(mouseX-68,  mouseY+19);
curveVertex(mouseX-45, mouseY-15);
curveVertex(mouseX-32, mouseY+120);
curveVertex(mouseX-45, mouseY-15);
endShape();

//Roundears
stroke(255);
fill(255);
ellipse(mouseX+60,mouseY+115,64,60);
ellipse(mouseX-60,mouseY+115,64,60);

//head
stroke(255);
fill(255,255,255);
ellipse (mouseX,mouseY,110,80);

//Mouth
stroke(0);
arc(mouseX+5,mouseY+15.5,10,10,0,TWO_PI-PI);
arc(mouseX-5,mouseY+15.5,10,10,0,TWO_PI-PI);

if(mousePressed==true){

//Bubble
stroke(255);
ellipse(mouseX-95,mouseY-86,130,85);
//Text
PFont font;
font = loadFont("Palatino-Italic-20.vlw");
textFont(font);
fill(255,8,165);
text("Hello there~",mouseX-145, mouseY-80);
stroke(255);
fill(255);
strokeWeight(3);
line(mouseX-95,mouseY-75,mouseX-46,mouseY-36);


 //Lashes
  stroke(0);
  strokeWeight(1);
  fill(0);
  arc(mouseX-13, mouseY+0, 15, 5, 0, PI);
  stroke(0);
  strokeWeight(1);
  fill(0);
  arc(mouseX+13, mouseY+0, 15, 5, 0, PI);
  //blush
  stroke(255);
  fill(255,162,234);
  ellipse(mouseX-25,mouseY+9, 15,10);
  ellipse(mouseX+25,mouseY+9,15,10);
  } else{

//Eyes
stroke(0);
fill(255,0,0);
 float LeyeX = mouseX-16;
    float eyeY = mouseY+0;
    float ReyeX = mouseX+16;
 ellipse(LeyeX,eyeY,15,15);
 ellipse(ReyeX,eyeY,15,15);

 //Highlights
stroke(255);
fill(255,255,255);
 float LLeyeX = mouseX-10;
    float LLeyeY = mouseY+0;
    float RReyeX = mouseX+23;
 ellipse(LLeyeX,LLeyeY,5,5);
 ellipse(RReyeX,LLeyeY,5,5);
}
}

In order to get the background, you will have to save this picture and load it onto Processor.
And to get the font, go to "Tools", then "Create Font...", then find "Palatino-Italic". Set the size to 20, and then press "Okay"!

No comments:

Post a Comment