sketch
var points = 70;
function setup() {
createCanvas(400, 400);
strokeWeight(2);
frameRate (30);
}
function draw() {
background ("#CDE7EE")
push();
translate (width/2,height/2);
drawHeart();
pop();
function drawHeart () {
var a = map(mouseX,0,width,25,75);
var b = map(mouseY,0,height,0,100);
beginShape()
for (var i = 0; i < points; i ++ ) {
var t= map(i,0,points,0,70) x = a* sin(t)*sin(t)*sin(t);
y = b*cos(t)-a*cos(2*t)-2*cos(b*t)-cos(a*t);
fill("#F1CDD4") strokeWeight(2);
vertex(-x,-y) }
endShape(CLOSE);
}
}
