Assume you are given an integer $n$ and want to produce a sampling pattern with that many points on each side.
The square patterns is trivial, you just do n rows of n equidistant points at regular intervals.
The triangle pattern is also easy, it is the element basis used in FEM analysis, i.e. this picture:
Is there a way to generalise this sampling pattern to an arbitrary regular polygon?