xxxxxxxxxx
let catX, catY, catSize;
let catColor;
function setup() {
createCanvas(400, 400);
// Random properties for the cat
catX = random(width);
catY = random(height);
catSize = random(30, 100); // Random size between 30 and 100
}
function draw() {
background(255);
// Draw the cat body
fill(0);
ellipse(catX, catY, catSize, catSize); // Draw the body
// Draw the ears
fill(0);
triangle(catX - catSize/2 , catY - catSize / 3, catX - catSize / 3, catY - catSize / 1.5, catX - catSize / 4, catY - catSize / 2); // Left ear
triangle(catX + catSize/2, catY - catSize / 3, catX + catSize / 3, catY - catSize / 1.5, catX + catSize / 4, catY - catSize / 2); // Right ear
// Draw the eyes
fill(255); // White color for the eyes
ellipse(catX - catSize / 4, catY - catSize / 5, catSize / 4, catSize / 3); // Left eye
ellipse(catX + catSize / 4, catY - catSize / 5, catSize / 4, catSize / 3); // Right eye
// Draw the nose
fill('#FC9AF2'); // black color for the eyes
ellipse(catX - catSize / 125, catY - catSize / 12, catSize / 8, catSize / 8); // nose
fill(0); // Black color for the pupils
ellipse(catX - catSize / 4, catY - catSize / 4, catSize / 8, catSize / 8); // Left pupil
ellipse(catX + catSize / 4, catY - catSize / 4, catSize / 8, catSize / 8); // Right pupil
}