rewrite calcRotcurve