xxxxxxxxxx
34
//Write a program that uses arcs or Bézier curves to generate images of one or more butts.
let x, y;
let r, g, b;
let xspeed = 5;
let yspeed = 2;
function setup() {
createCanvas(200, 200);
x = width / 2;
y = height;
r = random(255);
g = random(255);
b = random(255);
}
function draw() {
background(255);
fill(r, g, b);
stroke(r, g, b);
ellipse(x-20, y, 55, 55);
ellipse(x+20, y, 55, 55);
x = x + random(-4, 4);
y = y - 1;
if (y < 0) {
y = height;
}
}
function mousePressed() {
r = random(255);
g = random(255);
b = random(255);
}