Now calculating the area and perimeter.

Those values are inserted in the documents.