Distance between two polygons

Given two convex polygons P and Q. Determine the distance between them.

The distance between two convex polygons P and Q is defined as the length of the shortest distance between points p and q, such that point p lies inside polygon P, and point q lies inside polygon Q.

A point p is said to be inside polygon P if point p is inside polygon P or if it is on any of its edges.

How many points are there in the polygons?

No of points, of the 2 polygons lie between 3 and 5000