xxxxxxxxxx
let face;
let writing;
function setup() {
createCanvas(360, 740);
angleMode(DEGREES);
imageMode(CENTER);
}
function preload(){
face = loadImage ('face.png');
writing = loadImage('writing.png');
lotus = loadImage('lotus2.png');
}
function draw() {
background(240, 217, 173);
noStroke();
for (i = 0; i< 740; i++){
fill(207, 86, 0);
square(0, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(207, 86, 0);
square(30, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(207, 86, 0);
square(60, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(207, 86, 0);
square(90, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(201, 95, 20);
square(120, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(201, 95, 20);
square(150, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(201, 95, 20);
square(180, i, 20);
i += 30
}
for (i = 0; i< 740; i++){
fill(201, 95, 20);
square(210, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(232, 100, 7);
square(240, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(232, 100, 7);
square(270, i, 20);
i += 30
}
for (i = 0; i< 740; i++){
fill(232, 100, 7);
square(300, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(232, 100, 7);
square(330, i, 20);
i += 30;
}
for (i = 0; i< 740; i++){
fill(232, 100, 7);
square(359, i, 20);
i += 30;
}
//lucky cat
strokeWeight(5);
stroke(204, 180, 163);
//body
fill(214);
ellipse(120, 340, 50, 35); // left upper arm
ellipse(100, 320, 30, 65); // left forearm
strokeWeight(10)
ellipse(180, 370, 100, 130); // body
strokeWeight(5);
ellipse(225, 355, 30, 50); // right upper arm
//head
fill(181, 104, 94);
triangle(170, 300, 215, 245, 225, 300);// left ear
triangle(135, 300, 150, 245, 185, 300);// right ear
fill(214);
strokeWeight(10);
ellipse(180, 300, 95, 75); // head
image(face, 180, 315, 60, 20);
fill(64, 56, 55);
noStroke();
circle(195, 295, 13);// left eye
circle(165, 295, 13);// right eye
fill(214);
circle(197, 293, 3);// left eye
circle(162, 294, 3);// left eye
fill(181, 104, 94);
ellipse(180, 305, 10, 5);
//legs
fill(214);
stroke(204, 180, 163);
strokeWeight(5);
ellipse(140, 415, 30, 70); // left leg
ellipse(140, 445, 30, 10); // left foot paw
ellipse(225, 415, 30, 70); // right leg
ellipse(225, 445, 30, 10); // right foot paw
//golden tablet
fill(255, 183, 0);
stroke(176, 132, 19);
strokeWeight(2);
rect(175, 360, 50, 90, 15);
image(writing, 200, 390, 30, 30);
image(writing, 200, 425, 30, 30);
fill(255);
stroke(255, 0, 0);
strokeWeight(5);
textFont('Georgia');
textSize(30);
text("the luck is within", 70, 515);
var x= 0;
while (x <= width){
fill(240, 20, 10);
noStroke();
circle (x, 10, 40);
fill(245, 185, 66);
circle (x, 10, 18);
fill(255);
circle(x, 10, 5);
image(lotus, x, 50, 30, 20);
//bottom
fill(240, 20, 10);
noStroke();
circle (x, 720, 40);
fill(245, 185, 66);
circle (x, 720, 18);
fill(255);
circle(x, 720, 5);
image(lotus, x, 680, 30, 20);
x = x+ 40 ;
}
}