xxxxxxxxxx
38
var angle = 0; // initialize angle variable
var scalar = 270; // set the radius of circle
var startX = 150; // set the x-coordinate for the circle center
var startY = 300; // set the y-coordinate for the circle center
function setup() {
createCanvas(300, 300);
angleMode(DEGREES);
}
function draw(){
// print(mouseX + " " + mouseY);
background(10,215,10)
fill(150, 180, 255);
noStroke();
rect(0, 0, 300, 200);
// fill(255, 204, 0);
// circle(50, 50, 40);
fill(255, 204, 0);
var x = startX + scalar * cos(angle);
var y = startY + scalar * sin(angle);
circle(x, y, 50);
fill("#EAE1B6");
rect(50, 130, 200, 120);
fill("#C65F47");
triangle(50, 130, 150, 40, 250, 130);
angle++; // increment angle for the next frame
}