Test:
maximum y < position in y + radius
y1=maximum y – ball position – radius
t=y1/vely
x1=t*velx
ball position x=previous ball position x + x1
ball position y=previous ball position y + y1
vely=-vely
ball position x=ball position x + (1-t)* velx
ball position y=ball position y + (1-t)* vely