Is there a simple way to know how many rectangles in some shaped grid there are if one knows the number of their corner points?

118 Views Asked by At

Is there a simple way to know how many rectangles in some shaped grid there are if one knows the number of their corner points?

I.e. if I have some grid (possibly non-equilateral, other than rectangular shape as well) and I know all the corner points of individual rectangles in the grid, but not the rectangles themselves (i.e. I don't have "list of type: rectangle", I have for "a list of points"), then can I calculate how many rectangles there are?

Particularly, I want to know the area of a polygon by intersecting it with a grid of rectangles.