def getHalfSimplifiedLoop(loop, radius, remainder):
 if (len(loop) < 2):
  return loop
 channelRadius = (radius * 0.01)
 simplified = []
 addIndex = 0
 if (remainder == 1):
  addIndex = (len(loop) - 1)
 for pointIndex in xrange(len(loop)):
  point = loop[pointIndex]
  if (((pointIndex % 2) == remainder) or (pointIndex == addIndex)):
   simplified.append(point)
  elif (not isWithinChannel(channelRadius, pointIndex, loop)):
   simplified.append(point)
 return simplified

def getHalfSimplifiedLoop ( loop , radius , remainder ) : if ( len ( loop ) < 2 ) : return loop channelRadius = ( radius * 0.01 ) simplified = [ ] addIndex = 0 if ( remainder == 1 ) : addIndex = ( len ( loop ) - 1 ) for pointIndex in xrange ( len ( loop ) ) : point = loop [ pointIndex ] if ( ( ( pointIndex % 2 ) == remainder ) or ( pointIndex == addIndex ) ) : simplified . append ( point ) elif ( not isWithinChannel ( channelRadius , pointIndex , loop ) ) : simplified . append ( point ) return simplified
get the loop with half of the points inside the channel removed .