If you just want to know the integer points which are inside the
polygon, you can do this:
Find the min and max y values for the segments making up the polygon.
Call them minY and maxY.
For y = minY to maxY
Find points where polygon segments intersect y. Call them minX and
maxX.
For x = minX to maxX
Output (x,y)
Don
On Apr 5, 3:08 am, SAMMM <[email protected]> wrote:
> Suppose you are given some convex polygon . Now suppose you want to
> divide the polygon area into a number of grids . And I want to find
> the points after we have divided the polygon .
>
> For simplicity u can consider convex polygon , don't take into account
> concave or self intersecting polygon .
>
> For example :-
>
> This is a Grid :- The points are the one where the Vertical and
> horizontal lines cross each other .
>
> | | | | | |
> -----|------|-----|------|-----|-----|------
> | | | | | |
> -----|------|-----|------|-----|-----|------
> | | | | | |
> -----|------|-----|------|-----|-----|------
> | | | | | |
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.