Support non-square elements in regular quad mesh generation

as titled
triangle is also available. for testing, perhaps we extend it to other 3d element types.