Rhino seems to do this by dividing the line up into segments or points and then creating a center axis point and rotating those points around said axis point in measured steps as specified by user... more points = (obviously) smoother... etc. more points would also increase computational time.