### Count number of points... ?

Posted:

**Thu Feb 23, 2006 2:19 pm**Given a convex-polygon with with integer x,y coordinate of vertices. Count how many integer x,y coordinate points that lies inside the polygon.

I figure out a algorithm that run in O(N * D) with N is the number of vertices and D is the distance of left-bound coordinate and right-bound coordinate. I heard that there is a formular for this problem. Is it true ?

I figure out a algorithm that run in O(N * D) with N is the number of vertices and D is the distance of left-bound coordinate and right-bound coordinate. I heard that there is a formular for this problem. Is it true ?