code: def keep_high_angle(vertices, min_angle_deg):
      
      accepted = []
      v = vertices
      v1 = v[1] - v[0]
      accepted.append((v[0][0], v[0][1]))
      for i in range(1, len(v) - 2):
          v2 = v[i + 1] - v[i - 1]
          diff_angle = np.fabs(angle(v1, v2) * 180.0 / np.pi)
          if diff_angle > min_angle_deg:
              accepted.append((v[i][0], v[i][1]))
              v1 = v[i] - v[i - 1]
      accepted.append((v[-1][0], v[-1][1]))
      return np.array(accepted, dtype=vertices.dtype)
docs: Keep vertices with angles higher then given minimum.