Add function to cut the template into square
The length of square and the center of square are the same as the template