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

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