Restated geometrically, plot all of these points Pi on the xy-plane. Let's assume that the points indices increase from left to right (P0 is the leftmost point, Pn is the rightmost point). Then, starting at P0, draw a ray straight down parallel with the y-axis, and rotate this ray counter-clockwise until it hits the point Pk1 (not necessarily P1).