title: Given a polygon and a point in 2D, how can one find the feature (vertex or edge) of the polygon closest to the point?
body: <p>A naive approach is to find, for each edge in the polygon, the point on that edge closest to the given point, and then take the one that's closest. Is there a faster algorithm? My goal is to implement a 2D Super Mario Galaxy-style platformer.</p>
  
  <p>Apparently this can be done with Voronoi regions, as in this video: <a href="http://www.youtube.com/watch?v=Ldh2YKobuWo" rel="nofollow">http://www.youtube.com/watch?v=Ldh2YKobuWo</a></p>
  
  <p>However, I can't find any Voronoi algorithms that deal with edges as well as points. Ideas?</p>