A simple class that to calculate frames in a grid.