xxxxxxxxxx
38
let words = ["Mind", "Body", "Soul","Balance","Support"];
function setup() {
createCanvas(400, 400);
// (Hue, Saturation, Brightness)
colorMode(HSB);
noStroke();
// call a function (assumed to be defined elsewhere) to handle text output
textOutput();
}
function draw() {
background('#FABAD43F');
// Map the mouseX position (0 to 720) to a hue value (0 to 360)
let circleHue = map(mouseX, 0, width, 0, 360);
// Map the mouseY position (0 to 400) to a diameter range (20 to 300)
let diameter = map(mouseY, 0, height, 20, 300);
// Set fill color for the circle using HSB values
// circleHue for color, 40 for low saturation (pastel), and 90 for high brightness
fill(circleHue, 20, 95);
// Draw a circle at the center of the canvas with the calculated diameter
circle(width / 2, height / 2, diameter);
// Draw inner circle with a fixed size or different color
fill(circleHue, 10, 100); // other color for inner circle
circle(width / 2, height / 2, diameter * 0.5); // Inner circle is half the outer circle
}