basic math for manipulating the length, curvature and Z parameters of base line