PolyMesher: a general-purpose mesh generator for polygonal elements written in Matlab