These are two scripts which can be used to make a convex polygon or spiral line out of an arbitrary set of points.
Simply provide either of the scripts with the ds_list of points (x0, y0, x1, y1, ....) and you will get a ds_list of the counterclockwise list of convex polygon or spiral points.
Download demo mirror1
Download demo mirror2
You can get this asset for free if you Subscribe to my mailing list.
You can also follow me on Twitter (@smallbigsquare)