grid3D.py cloned and modified not to use matplotlib