There is an algorithm for merging two convex hulls in O(n1+n2) time.You just need to find upper and lower tangent for the given hulls and then exclude the points inside the upper and lower tangents.
Check out Tangents between two Convex Polygons , it has code snippet too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.