Create calculateIntersections