A C# port of Jason Long's GeoPattern