xxxxxxxxxx
/* PLANETE1
* jacques maire 07/09/2021
* FORK TAKAWO 200520
*/
let pallete = ["#FD6F83", "#81B0FF", "#EE8DD3", "#F8B600", "#3CFF4F", "#F5F311", "#02020C"];
let sep = 5.0;
let mod;
let tempo;
var c,g;
function setup() {
c= createCanvas(900, 800);
g = createGraphics(width,height);
colorMode(HSB, 360, 100, 100, 100);
mod = 1000;
tempo=0.0;
}
function draw() {
var ctx = c.canvas.getContext("2d");
randomSeed(980);
tempo=frameCount*0.01;
for (let y = -height; y < height; y += height / 10) {
let c1 = random(pallete);
let c2 = random(pallete);
let c3 = random(pallete);
let c4 = random(pallete);
var grd = ctx.createLinearGradient(0, 0, width*cos(tempo),height*sin(tempo));
grd.addColorStop(0.99, c1);
grd.addColorStop(0.4+0.6*sq(cos(frameCount / 50.0)), c2);
grd.addColorStop(0.1, c3);
grd.addColorStop(0.3, c1);
grd.addColorStop(0.7+0.3*sq(cos(frameCount / 190.0)), c4);
grd.addColorStop(0.5+0.5*sq(sin(frameCount / 280.0)), c3);
drawingContext.fillStyle = grd;
noStroke();
beginShape();ellipse(300+460*cos(tempo),500+350*sin(tempo),100);
for (let x = 0; x <= width; x+=10) {
let yy = y*2.2 + sq(map(noise(mod+y, x / 1600, frameCount / 200), 0, 1, -height / sep, height / sep));
vertex( 4.0*x, yy);
}
vertex(0, width);
vertex(0,height);
endShape();
}
}