write midpoint mesh to file (untested)