Function curveRotate