TITLE: Algorithm to find the point in a convex polygon closest to an external point
QUESTION [7 upvotes]: Given a convex polygon $P$, and a point $q$ of the plane, external to $P$, what is the fastest algorithm to compute the closest point in $P$ to $q$?
A linear algorithm of course works, computing the distance for each vertex of $P$, finding the 2 closest vertices $u$ and $v$ to $q$ and then projecting $q$ onto the edge $uv$, if such projection belongs the edge. If not, returning the closest vertex works.
But I was wondering if a binary search could not be also possible, using the convexity. The running time would be $\mathcal{O}(\log n)$.

REPLY [2 votes]: This is a special case of computing the distance between two convex sets (a point by itself is a convex set). This paper A fast procedure for computing the distance between complex objects in three-dimensional space was brought to my attention by Joseph O'Rourke and it references an $\mathcal{O}(\log M)$ algorithm for the two dimensional case. Here $M$ is the sum of vertices of both polygons, so in our case $M=n+1$. However they note that

Because of their complexity and special emphasis on asymptotic
  performance, it is not clear that the algorithms in the preceding
  papers are efficient for practical problems where $M$ is large, but
  not exceedingly large. Unfortunately, very few, if any, computational
  experiments have been done.

The algorithm they present has however gained a lot of practical use - for example it is used in many physics engines (such as bullet physics) since the game objects are approximated by convex shapes.
The proper linear brute force algorithm is to compute the distance between $q$ and all vertices, compute the shortest distance between $q$ and all line segments (faces) and then pick the minimum. However this makes no use of the convexity.
EDIT: One way to make the brute force algorithm more efficient is probably to use some data structure like a k-d tree for nearest neighbor search but that is just an idea and i haven't worked out the details.