add comments for what the different points mean
calculate direction from one point to an adjacent