xxxxxxxxxx
66
/*
Uroš Krčadinac, 2021.
<https://www.krcadinac.com/>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
function setup() {
createCanvas(384, 1080);
colorMode(HSB, 360, 100, 100, 100);
background(360, 0, 100, 100);
noLoop();
}
function draw() {
let backcolor = color(179, 100, 70);
background(backcolor);
fill(color(47, 32, 95));
noStroke();
circle(width/2 - 60, 150, 100);
let i = 0;
for(let y = 160; y < height*0.9; y += 130) {
points = [];
points.push({ x: width, y: y });
points.push({ x: width, y: height});
points.push({ x: 0, y: height});
for(let x = 0; x < width; x += 30) {
let noiz = noise(x * 0.01, y * 0.01);
let vy = y + map(noiz, 0, 1, -50, 50);
points.push({ x: x, y: vy});
}
fill(backcolor);
beginShape();
points.forEach(p => vertex(p.x, p.y));
endShape();
i += 1;
let c = color(37, 86, 98);
c.setAlpha(i * 13);
fill(c);
beginShape();
points.forEach(p => vertex(p.x, p.y));
endShape();
if (i < 7) {
fill(color(47, 32, 95));
noStroke();
circle(width/2 - 60, y+120, 100);
}
}
save("looking.jpg");
}