Saturday 31 March 2012

Relation between a polygon and a point

Given a point (a,b) and a polygon (in form of a list of vertices (x0,y0)(x1,y1)...(x0,y0)).

How to optimally find if the point lies inside in the polygon or outside it ?

This was asked to me in adobe 1st round of interview.

No comments:

Post a Comment