adding perpindicular/parallel projected distance calculation.  not sure if PBCs are handled correctly here...