using the longer side to determine the number of sample points