Created GG2D.java class for gravity inversion