adapted bezierCurve for stacked areas
tests