xxxxxxxxxx
433
let x;
let y;
function setup() {
createCanvas(600, 400);
angleMode(DEGREES);
//gradient background
c1 = color(78, 234, 242);
c2 = color(18, 110, 25);
setGradient(c1, c2);
x = 0
y = 0
}
function draw() {
//sun
sun(510,20);
Rflower(570,320);
Lflower(100,320);
//pink flower
fill(245, 211, 243, 190);
ellipse(200, 360, 10, 10);
ellipse(207, 364, 10, 10);
ellipse(209, 370, 10, 10);
ellipse(203, 376, 10, 10);
ellipse(196, 377, 10, 10);
ellipse(193, 370, 10, 10);
ellipse(193, 363, 10, 10);
fill(118, 153, 118, 255)
ellipse(200, 400, 5, 40);
fill(180, 0, 180);
ellipse(200, 368, 10, 10);
//blue flower
fill(136, 201, 209, 190);
ellipse(250, 360, 10, 10);
ellipse(257, 364, 10, 10);
ellipse(259, 370, 10, 10);
ellipse(253, 376, 10, 10);
ellipse(246, 377, 10, 10);
ellipse(243, 370, 10, 10);
ellipse(243, 363, 10, 10);
ellipse(200, 400, 5, 40);
fill(229, 235, 61);
ellipse(250, 368, 10, 10);
fill(118, 153, 118, 255);
ellipse(250, 400, 5, 40);
//orange flower
fill(255, 108, 71, 190);
ellipse(290, 360, 10, 10);
ellipse(297, 364, 10, 10);
ellipse(299, 370, 10, 10);
ellipse(293, 376, 10, 10);
ellipse(286, 377, 10, 10);
ellipse(283, 370, 10, 10);
ellipse(283, 363, 10, 10);
ellipse(200, 400, 5, 40);
fill(229, 235, 61);
ellipse(290, 368, 10, 10);
fill(118, 153, 118, 255);
ellipse(250, 400, 5, 40);
fill(229, 235, 61);
ellipse(290, 368, 10, 10);
//purple flower
fill(156, 153, 255, 190);
ellipse(350, 360, 10, 10);
ellipse(357, 364, 10, 10);
ellipse(359, 370, 10, 10);
ellipse(353, 376, 10, 10);
ellipse(346, 377, 10, 10);
ellipse(343, 370, 10, 10);
ellipse(343, 363, 10, 10);
ellipse(350, 400, 5, 40);
fill(229, 235, 61);
ellipse(290, 368, 10, 10);
fill(237, 240, 89);
ellipse(350, 368, 10, 10);
//purple flower
fill(240, 147, 89, 190);
ellipse(450, 360, 10, 10);
ellipse(457, 364, 10, 10);
ellipse(459, 370, 10, 10);
ellipse(453, 376, 10, 10);
ellipse(446, 377, 10, 10);
ellipse(443, 370, 10, 10);
ellipse(443, 363, 10, 10);
fill(229, 235, 61);
ellipse(450, 368, 10, 10);
fill(118, 153, 118, 255);
ellipse(450, 400, 5, 40);
//light orange flower
fill(224, 117, 195, 190);
ellipse(540, 360, 10, 10);
ellipse(547, 364, 10, 10);
ellipse(549, 370, 10, 10);
ellipse(543, 376, 10, 10);
ellipse(536, 377, 10, 10);
ellipse(533, 370, 10, 10);
ellipse(533, 363, 10, 10);
fill(229, 235, 61);
ellipse(540, 368, 10, 10);
fill(118, 153, 118, 255);
ellipse(540, 400, 5, 40);
//bird 1
bird(110,50);
//bird2
bird2(108,175);
//leaf
leaf(100, 400);
leaf(200, 400);
leaf(0, 400);
leaf(65, 400);
leaf(75, 400);
leaf(70, 400);
leaf(80, 400);
leaf(90, 390);
leaf(95, 390);
leaf(100, 380);
leaf(100, 400);
leaf(105, 400);
leaf(110, 400);
leaf(115, 390);
leaf(120, 390);
leaf(125, 400);
leaf(130, 400);
leaf(135, 390);
leaf(140, 400);
leaf(145, 400);
leaf(150, 390);
leaf(155, 400);
leaf(160, 390);
leaf(165, 400);
leaf(170, 390);
leaf(175, 400);
leaf(180, 390);
leaf(185, 400);
leaf(190, 400);
leaf(195, 400);
leaf(200, 400);
leaf(205, 400);
leaf(210, 400);
leaf(215, 400);
leaf(220, 400);
leaf(225, 390);
leaf(230, 400);
leaf(235, 400);
leaf(235, 380);
leaf(240, 400);
leaf(245, 400);
leaf(250, 400);
leaf(255, 400);
leaf(260, 400);
leaf(265, 400);
leaf(270, 400);
leaf(275, 390);
leaf(280, 400);
leaf(285, 400);
leaf(290, 400);
leaf(295, 400);
leaf(300, 400);
leaf(305, 390);
leaf(310, 400);
leaf(315, 390);
leaf(320, 400);
leaf(325, 400);
leaf(330, 390);
leaf(335, 400);
leaf(340, 390);
leaf(345, 400);
leaf(350, 400);
leaf(355, 390);
leaf(360, 400);
leaf(365, 390);
leaf(370, 390);
leaf(375, 400);
leaf(380, 390);
leaf(385, 400);
leaf(390, 400);
leaf(395, 400);
leaf(400, 400);
leaf(405, 390);
leaf(410, 390);
leaf(415, 400);
leaf(420, 400);
leaf(425, 400);
leaf(430, 400);
leaf(435, 400);
leaf(440, 400);
leaf(445, 400);
leaf(450, 400);
leaf(455, 390);
leaf(460, 400);
leaf(465, 390);
leaf(470, 400);
leaf(475, 400);
leaf(480, 400);
leaf(485, 390);
leaf(490, 390);
leaf(495, 400);
leaf(500, 400);
leaf(505, 390);
leaf(510, 400);
leaf(515, 390);
leaf(520, 400);
leaf(525, 390);
leaf(530, 400);
leaf(535, 400);
leaf(540, 390);
leaf(545, 400);
leaf(550, 390);
leaf(555, 400);
leaf(560, 400);
leaf(565, 390);
leaf(570, 400);
leaf(575, 400);
leaf(580, 400);
leaf(585, 390);
leaf(590, 400);
leaf(595, 400);
leaf(600, 400);
cloud(200,20);
// cloud(400,30);
fill(255, 255, 255, 10);
fill(204, 204, 204);
fill(178, 234, 242, 50);
ellipse(440, 50, 60, 60);
ellipse(470, 70, 60, 60);
ellipse(400, 60, 60, 60);
ellipse(460,80, 60, 60);
ellipse(410, 80, 60, 60);
tree(100,100);
circletree(55,200);
vine(100,100);
plant(160,380);
plant(330,390);
plant(500,390);
}
function circletree(){
//circle on tree
noStroke();
fill(31, 5, 2, 5);
ellipse(55, 200, 30, 50);
}
function Rflower(){
//right big flower
noStroke();
fill(255, 194, 239, 180);
arc(570, 320, 30, 30, 180, 180);
fill(255, 194, 239, 180);
arc(560, 340, 30, 30, 180, 180);
arc(575, 360, 30, 30, 180, 180);
arc(600, 345, 30, 30, 180, 180);
arc(593, 325, 30, 30, 180, 180);
fill(250, 247, 55, 255);
ellipse(580, 340, 20, 20);
}
function Lflower(){
//left big flower
fill(197, 159, 201, 190);
ellipse(100, 320, 30, 30);
ellipse(120, 335, 30, 30);
ellipse(120, 352, 30, 30);
ellipse(100, 360, 30, 30);
fill(255, 255, 84);
ellipse(100, 340, 20, 20);
// fill(255, 255, 84, 255);
// ellipse(100, 340, 20, 20);
// fill(197, 159, 201, 190);
// ellipse(100, 320, 30, 30);
// ellipse(120, 335, 30, 30);
// ellipse(120, 352, 30, 30);
// ellipse(100, 360, 30, 30);
}
function leaf(leafX, leafY) {
noStroke();
fill(29, 64, 35);
blendMode(DARKEST);
ellipse(leafX, leafY, 5, 30)
ellipse(leafX, leafY, 5, 30);
if (x < width) {
x = x + 1;
} else if (x == width) {
x = 0;
}
}
function cloud(cloudX,cloudY){
noStroke();
fill(255, 255, 255, 50);
fill(204, 204, 204);
fill(178, 234, 242, 50);
blendMode(LIGHTEST);
ellipse(cloudX, cloudY, 60, 60);
ellipse(cloudX-30, cloudY-10, 60, 60);
ellipse(cloudX+40, cloudY-10, 60, 60);
ellipse(cloudX-210,cloudY-20, 40, 60);
}
function vine(){
//vines
fill(31, 79, 48);
beginShape();
vertex(0, 0);
vertex(40, 200);
vertex(100, 400);
endShape();
beginShape();
vertex(70, 0);
vertex(30, 200);
vertex(20, 400);
endShape();
beginShape();
vertex(60, 0);
vertex(80, 80);
vertex(90, 400);
endShape();
}
function sun(){
noStroke();
fill(240, 219, 84, 200);
ellipse(500, 20, 80, 80);
}
function bird(){
noStroke();
fill(249, 255, 140);
triangle(100, 50, 89, 52, 100, 55);
fill(34, 154, 161);
ellipse(110, 50, 20, 20);
ellipse(122, 68, 25, 25);
fill(0, 0, 0);
ellipse(107, 50, 3, 3);
ellipse(120, 85, 2, 10);
ellipse(127, 85, 2, 10);
}
function bird2(){
//bird 2
noStroke();
fill(223, 230, 103);
ellipse(108, 175, 20, 20);
ellipse(122, 190, 25, 25);
fill(242, 173, 61);
triangle(97.9, 175, 82, 178, 99, 181);
fill(0, 0, 0);
ellipse(104, 175, 3, 3);
}
function plant(plantX,plantY){
fill(18, 99, 38);
ellipse(plantX, plantY, 10, 250);
fill(4, 64, 19);
ellipse(plantX+19, plantY-40, 30, 10);
ellipse(plantX-18, plantY-80, 30, 10);
ellipse(plantX-18, plantY-10, 30, 10);
}
function setGradient(c1, c2) {
noFill();
for (var y = 0; y < height; y++) {
var inter = map(y, 0, height, 0, 1);
var c = lerpColor(c1, c2, inter);
stroke(c);
line(0, y, width, y);
}
}
function tree(){
//tree
noStroke();
fill(242, 194, 143);
fill(125, 93, 59);
fill(82, 50, 16);
blendMode(DARKEST);
beginShape();
vertex(0, 400);
vertex(10, 350);
vertex(10, 340);
vertex(10, 320);
vertex(10, 300);
vertex(20, 200);
vertex(25, 100);
vertex(10, 0);
vertex(80, 0);
vertex(88, 200);
vertex(92, 250);
vertex(100, 300);
vertex(80, 400);
endShape();
beginShape();
vertex(60, 200);
vertex(140, 200);
vertex(180, 220);
endShape();
beginShape();
vertex(60, 100);
vertex(140, 80);
vertex(190, 80);
endShape();
}