This document describes an algorithm to connect randomly ordered 2D points into a minimal nearest-neighbor closed contour. It begins by explaining that the algorithm takes in x and y coordinate points and connects them in either a clockwise or counterclockwise direction starting from a specified point. It then provides examples of applying the algorithm to continuous points in both normal and pathological cases, as well as to a square grid. The algorithm also allows filtering out points farther than a given distance limit.