adding the math for hobby's splines