xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
let percent = map(mouseX, 0, width, 0.0, 1.0);
let formula = (-pow(percent, 2) + percent) * 4; // Will go from 0 > 1 > 0
background(0);
stroke(255);
strokeWeight(50);
point(width / 2, map(formula, 0, 1, height / 4, height - height / 4));
}