Finding dimensions and perimeter of shapes