i need to know the formula to get the coordinates that are on the perimeter and within the shape of square and rectangle. does anyone know that?
lets say square coordinates of (1,1) , (1,3) , (3,3) , (3,1)
points on perimeter would be (1,2) , (2,1) , (2,3) , (3,2) excluding the actual coordinates above.
points within shape would be (2,2)