2

i was looking for a way to display the points in this graph

1 Answers1

1

To find turning points, you actually want the angle of two vectors be small, because small theta is associated with greatest change in direction.

Just change idx = np.where(theta > min_angle)[0]+1 to idx = np.where(theta < np.pi)[0] + 1.

Here's what I got:

enter image description here

keineahnung2345
  • 2,635
  • 4
  • 13
  • 28