Rotating calipers is powerful instrument for such problems.
Look at part 2.6 The Convex Hull of Two Convex Polygons
of this article
To comment: I am sure this is very simple algorithm.
- Start with vertical line.
- Find the leftmost points of both polygons. Choose the most left one of them. It belongs to hull.
- Fix the line in this point.
- Rotate the line about this point until it touches next point (from both polygons) (note that you need only forward search, so overall time is O(m+n))
- Add this point to the hull, fix line.
- Repeat.
Look article (and other rot.cal. descriptions) for details.
Note that this algorithm resembles gift wrapping