D.Tangent: computing normal vectors to segments and trails