added deformGrid2d and changed argument "both" in deformGrid3d to show, for better control.