Arc length calculation