parameters: (points, epsilon)
return_statement: return results
docstring: Reduces a series of points to a simplified version that loses detail, but
      maintains the general shape of the series.
docstring_summary: Reduces a series of points to a simplified version that loses detail, but
      maintains the general shape of the series.
docstring_tokens: Reduces a series of points to a simplified version that loses detail but maintains the general shape of the series .
function: def rdp(points, epsilon):
      """
      Reduces a series of points to a simplified version that loses detail, but
      maintains the general shape of the series.
      """
      dmax = 0.0
      index = 0
      for i in range(1, len(points) - 1):
          d = point_line_distance(points[i], points[0], points[-1])
          if d > dmax:
              index = i
              dmax = d
      if dmax >= epsilon:
          results = rdp(points[:index+1], epsilon)[:-1] + rdp(points[index:], epsilon)
      else:
          results = [points[0], points[-1]]
      return results
function_tokens: def rdp ( points , epsilon ) : dmax = 0.0 index = 0 for i in range ( 1 , len ( points ) - 1 ) : d = point_line_distance ( points [ i ] , points [ 0 ] , points [ - 1 ] ) if d > dmax : index = i dmax = d if dmax >= epsilon : results = rdp ( points [ : index + 1 ] , epsilon ) [ : - 1 ] + rdp ( points [ index : ] , epsilon ) else : results = [ points [ 0 ] , points [ - 1 ] ] return results