Text this: Computing the Detour and Spanning Ratio of Paths, Trees, and Cycles in 2D and 3D.