sample python for calculating render sizes for a fixed height grid