xxxxxxxxxx
249
let i = 1;
let X = 60;
let Y = 60;
let xspeed = 2;
let yspeed = 2;
function setup() {
createCanvas(600, 600);
angleMode(DEGREES);
}
function draw() {
// background(color("#1a5861"));
background(230, 230, 230);
stroke(color("#D99F3C"));
X += xspeed;
Y += yspeed;
if (X > 500 || X < 50) {
xspeed = -xspeed;
}
if (Y > 500 || Y < 50) {
yspeed = -yspeed;
}
// i++;
//translate(300, 300);
translate(X, Y);
rotate(60 + i);
// scale(1*i,1);
fill(color("#F0B4B1"));
rect(-290, -500, 570, 1000);
strokeWeight(4);
line(280, -500, 280, 500);
line(230, -500, 230, 500);
line(-290, -500, -290, 500);
line(-240, -500, -240, 500);
stroke(color("#8a0538"));
for (let j = 0; j < 1000; j += 20) {
circle(10, -500 + j, 7);
}
// stroke(color("#f8d94f"));
// fill(color("#f8d94f"));
stroke(color("#D99F3C"));
fill(color("#D99F3C"));
// triangular();
for (let j = -500; j < 800; j += 40) {
for (let i = -240; i < 800; i += 520)
triangle(i, j, i - 40, j + 20, i, j + 40);
}
triangle(-240, -300, -280, -280, -240, -260);
curveLine();
strokeWeight(6);
stroke(color("#D99F3C"));
fill(color("#CC0000"));
push();
translate(0, 0);
strokeWeight(4);
circle(-65, 40, 10);
circle(-85, 60, 10);
circle(-110, 80, 10);
circle(-130, 100, 10);
circle(-140, -100, 10);
circle(-120, -80, 10);
circle(-100, -60, 10);
pop();
//0th
push();
translate(240, -630);
scale(-1, 1);
fill(color("#DD313F"));
stroke(color("#D99F3C"));
paisley(80, 150, 0.9, 0.9);
fill(color("#8a0538"));
dots(70, 150);
noStroke();
// stroke(color("#6FEDED"));
paisley(80, 145, 0.75, 0.75);
// stroke(color("#9AFFAB"));
fill(color("#F77A9D"));
paisley(80, 138, 0.55, 0.55);
// stroke(color("#c25b96"));
fill(color("#CC0000"));
paisley(80, 130, 0.35, 0.35);
pop();
// 3rd
fill(color("#E64A5E"));
paisley(80, 150, 0.9, 0.9);
fill(color("#8a0538"));
dots(70, 150);
// stroke(color("#6FEDED"));
noStroke();
paisley(80, 145, 0.75, 0.75);
// stroke(color("#9AFFAB"));
fill(color("#CC0000"));
paisley(80, 138, 0.55, 0.55);
fill(color("#F77A9D"));
paisley(80, 130, 0.35, 0.35);
//2nd
stroke(color("#D99F3C"));
fill(color("#8a0538"));
paisley(170, -70, -0.8, 0.8);
push();
//scale(1, -1);
dots(230, -70);
pop();
strokeWeight(6);
noStroke();
// stroke(color("#CC0000"));
fill(color("#DD313F"));
paisley(170, -75, -0.7, 0.65);
// stroke(color("#9AFFAB"));
fill(color("#F77A9D"));
paisley(170, -80, -0.5, 0.45);
// stroke(color("#6FEDED"));
fill(color("#CC0000"));
paisley(170, -90, -0.3, 0.25);
//1st
stroke(color("#D99F3C"));
fill(color("#CC0000"));
paisley(80, -270, 0.6, 0.6);
dots(80, -270);
// stroke(color("#f7b1ab"));
noStroke();
fill(color("#f7b1ab"));
paisley(80, -270, 0.5, 0.5);
// stroke(color("#6FEDED"));
fill(color("#E64A5E"));
paisley(80, -275, 0.4, 0.4);
// stroke(color("#9AFFAB"));
fill(color("#8a0538"));
paisley(80, -275, 0.25, 0.25);
strokeWeight(10);
//2 waves
stroke(color("#D99F3C"));
fill(color("#005628"));
wave(160, -155, 0.6);
wave(180, 330, 0.8);
push();
lotus(-10, -300, 90, 0.5, 0.5);
lotus(-220, -160, -45, 0.55, 0.55);
lotus(-10, -50, 90, 0.5, 0.5);
lotus(-220, 150, -45, 0.55, 0.55);
lotus(-10, 240, 90, 0.5, 0.5);
pop();
flower(-160, -305, 0.5);
flower(-60, -155, 0.5);
flower(-160, 0, 0.5);
flower(-60, 155, 0.5);
flower(-160, 305, 0.5);
flower(-60, 450, 0.5);
// let a = mouseX - 300;
// let b = mouseY - 300;
// text("(" + a + ", " + b + ")", 200, 200);
}
function wave(x, y, s) {
beginShape();
strokeWeight(4);
push();
translate(x, y);
scale(s);
rotate(-20);
vertex(54, -151);
bezierVertex(104, 30, -196, -121, -163, 41);
bezierVertex(-169, -73, 161, 76, 57, -148);
endShape();
pop();
}
function curveLine() {
beginShape();
push();
noFill();
stroke(color("#005628"));
strokeWeight(10);
translate(width / 2 - 270, -30);
vertex(-136, -370);
bezierVertex(58, -223, -327, -193, -132, -55);
bezierVertex(63, 83, -394, 91, -135, 255);
bezierVertex(124, 419, -416, 401, -180, 550);
endShape();
pop();
}
function paisley(x, y, s1, s2) {
beginShape();
push();
translate(x, y);
scale(s1, s2);
beginShape();
vertex(-16, 48);
bezierVertex(-41, 142, 69, 236, 129, 100);
bezierVertex(151, 50, 133, -16, 97, -68);
bezierVertex(48, -136, -18, -96, -39, -33);
bezierVertex(-72, 69, 16, -119, 32, -14);
bezierVertex(38, 28, 0, -12, -16, 48);
endShape();
pop();
}
function dots(x, y) {
circle(x - 30, y + 30, 20);
circle(x - 28, y + 60, 20);
circle(x - 25, y + 90, 20);
}
function flower(x, y, s) {
push();
stroke(color("#D99F3C"));
strokeWeight(4);
// fill(255, 244, 25);
fill(color("#2b91a1"));
translate(x, y);
scale(s);
for (let i = 0; i < 8; i++) {
rotate(i + 40);
ellipse(75, 0, 150, 50);
}
fill(color("#F46106"));
ellipse(0, 0, 80, 80);
pop();
}
function lotus(x, y, r, s1, s2) {
push();
strokeWeight(8);
stroke(color("#D647A6"));
fill(color("#F77A9D"));
translate(x, y);
scale(s1, s2);
rotate(r);
rect(0, 0, 100, 100, 0, 50, 50, 50);
translate(0, 120);
rotate(30);
rect(0, -150, 100, 100, 0, 50, 50, 50);
scale(0.8, -0.8);
rotate(-20);
rect(0, 0, 100, 100, 0, 50, 50, 50);
scale(1.2, -1.2);
rotate(-80);
rect(10, -60, 100, 100, 0, 50, 50, 50);
pop();
}