Perimeter and Cost calculations