prototype programming for intersection calculation
Improve the intersection mechanism and fixed bugs