Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

var Height;

function setup(){
Width = 700;
Height = 500;
createCanvas(Width, Height);

function draw(){
background(100,240,210);
strokeWeight(3);
stroke(0);

//Body
fill(255, 255, 255);
square(315, 300, 400, 20);
//decor
fill(0,0,0);
circle(715, 340, 80);
circle(695, 495, 150);
circle(415, 410, 160);
///////////////////////////////////////////////////////

//Horns
fill(255,128,0);
//right
beginShape();
curveVertex(200, 75);
curveVertex(200, 75); //x,y(1)
curveVertex(195, 50);
curveVertex(205, 10); //Top
curveVertex(225, 50);
curveVertex(245, 75); //x,y(2)
curveVertex(245, 75);
endShape();

//left
beginShape();
curveVertex(497, 75);
curveVertex(497, 75); //x,y(1)
curveVertex(503, 50);
curveVertex(495, 5); //Top
curveVertex(470, 35);
curveVertex(430, 75); //x,y(2)
curveVertex(430, 75);
endShape();
///////////////////////////////////////////////////////////

//Head
fill(255,255,255);
rect(200, 75, 300, 310, 10, 10, 0, 0);
//decor
fill(0, 0, 0);
arc(200, 310, 100, 155, PI+HALF_PI, HALF_PI);
arc(500, 250, 100, 232, HALF_PI, PI+HALF_PI);
arc(350, 75, 150, 100, TWO_PI, PI);
///////////////////////////////////////////////////////////

//Eyes
//right
ellipseMode(RADIUS);
fill(255);
ellipse(300, 175, 35, 35); //eyeball
ellipseMode(CENTER);
fill(0);
ellipse(310, 175, 20, 20); //pupil
//left
ellipseMode(RADIUS);
fill(255);
ellipse(395, 177, 32, 32); //eyeball
ellipseMode(CENTER);
fill(0);
ellipse(385, 177, 20, 20); //pupil
//////////////////////////////////////////////////////////

//Ears
//right
fill(255, 255, 255);
beginShape();
curveVertex(199, 82);
curveVertex(199, 82); //x,y(1)
curveVertex(199, 79);
curveVertex(150, 125); //1st fold
curveVertex(80, 175); //Top
curveVertex(150, 190); //Bottom
curveVertex(190, 115); //2nd fold
curveVertex(199, 105); //x,y(2)
curveVertex(199, 105);
endShape();

//left
fill(255, 255, 255);
beginShape();
curveVertex(501, 79);
curveVertex(501, 79); //x,y(1)
curveVertex(515, 82);
curveVertex(600, 135);
curveVertex(645, 145); //Top
curveVertex(635, 175); //Middle
curveVertex(580, 185); //Bottom
curveVertex(520, 115);
curveVertex(501, 105); //x,y(2)
curveVertex(501, 105);
endShape();
////////////////////////////////////////////////////////

//Nose
fill(255,110,255);
arc(350, 386, 300, 140, 0, PI);
fill(0, 0, 0);
strokeWeight(30);
point(310,410,25);
point(390,410,25);
///////////////////////////////////////////////////////

//Ear's Decor
noSmooth();
line(120, 179, 140, 180);
strokeWeight(23);
line(144, 182, 160, 157);
line(570, 129, 595, 146);
line(600, 148, 616, 151);
///////////////////////////////

//Text
noStroke();
textSize(21);
textAlign(LEFT);
text('Михайлова Наталья IBM-222', 5, 495);
///////////////////////////////////////////////////

You might also like