def isLoopIntersectingLoops(loop, otherLoops):
 for pointIndex in xrange(len(loop)):
  pointBegin = loop[pointIndex]
  pointEnd = loop[((pointIndex + 1) % len(loop))]
  if isLineIntersectingLoops(otherLoops, pointBegin, pointEnd):
   return True
 return False

def isLoopIntersectingLoops ( loop , otherLoops ) : for pointIndex in xrange ( len ( loop ) ) : pointBegin = loop [ pointIndex ] pointEnd = loop [ ( ( pointIndex + 1 ) % len ( loop ) ) ] if isLineIntersectingLoops ( otherLoops , pointBegin , pointEnd ) : return True return False
determine if the loop is intersecting other loops .