added functions to compute the base-expressed points and directions, and tested on point to point and ponit to line