xxxxxxxxxx
20
var r = 50;
var l, normal;
var v = 0;
var g = 5;
var k = 0.01;
function setup() {
createCanvas(400, 400);
normal = height/2;
l = normal;
}
function draw() {
background(240);
line(width/2, 0, width/2, l);
circle(width/2, l, r);
l += v;
v += g;
v -= k * (l-normal);
}