Firstly, please take a look at this picture:
Consider that the squares represent cartesian points and the asterisk marks the (0, 0) point.
In the picture, the given points are (in trigonometical order and marked with a '-' in the image): (0, 0); (0, 1); (0, 2); (-1, 2); (-2, 2); (-2, 1); (-3, 1); (-3, 0); (-3, -1); (-2, -1); (-2, -2); (-1, -2); (0, -2); (1, -2); (1, -1); (1, 0).
Given (just!) the points from above, how can I determine the area of the gray squares (5 in the posted picture)? ("the number of points of integer coordinates who are inside the polygon determined by the already specified points")
I want to implement something like this in C++. This is why I posted the question on StackOverflow.
But once someone explains me how (geometrical approach or anything), I hope I will be able to implement it by myself.
Any help is much much appreciated!
Thank you very much!