For a simulation I need to be able to take points that are scattered around randomly and move their point to the nearest vertex of a tessellated regular hexagon. That way each point is sitting on a vertex of the pattern.
Below is a diagram, showing a tessellated regular hexagon, and on the right is simply the vertices.

The goal is to take a bunch of random points and make them look like the picture on the right.
I dont exactly know how to define the "Start of this pattern" but perhaps we should say that the bottom left hexagon has its center at the coordinates at 0,0. And for the whole pattern we assume that each line length is n units long.