p5((s) => {
s.setup = function () {
s.createCanvas(width, height)
};
s.draw = function () {
s.noFill();
s.strokeWeight(5);
s.background(255);
let controlPoint1 = { x: 50, y: 100 }
let start = { x: width - 200, y: 50 }
let end = { x: s.mouseX, y: s.mouseY }
let controlPoint2 = { x: 50, y: height - 100 }
s.stroke(128);
s.curve(controlPoint1.x, controlPoint1.y, controlPoint1.x, controlPoint1.y, start.x, start.y, end.x, end.y)
s.curve(start.x, start.y, end.x, end.y, controlPoint2.x, controlPoint2.y, controlPoint2.x, controlPoint2.y)
s.stroke(255, 80, 0)
s.curve(controlPoint1.x, controlPoint1.y, start.x, start.y, end.x, end.y, controlPoint2.x, controlPoint2.y);
};
})