add intersectCal to handle all intersection calculation and use general object struct to represent lines
intersection for rectangles and fix distance bug in circle intersection