, please sort them byarg(x,y).arg(x,y).arg(x,y).In other words, sort the points in counterclockwise order that starts from the half linex≤0,y=0.x≤0,y=0.x≤0,y=0. Note: arg(x
Given NNN 2D-points (x0,y0),(x1,y1),…,(xN−1,yN−1)(x_0, y_0), (x_1, y_1), dots, (x_{N - 1}, y_{N - 1} )(x0,y0),(x1,y1),…,(xN−1,yN−1) please sort them by arg(x,y).arg(x,y).arg(x,y). In other words, sort the points in counterclockwise order that starts from the half line x≤0,y=0.x≤0,y=0.x≤0,y=0. Note: arg(x<0,y=0)=π.arg(x < 0, y = 0)=π.arg(x<0,y=0)=π. arg(0,0)=0.arg(0, 0)=0.arg(0,0)=0. Points with the same argument can be ordered arbitrarily.
(图片来源网络,侵删)