calculate and draw grid line intersection