compute length of guide lines