I currently have a vector of points
vector corners;
where I have previously stored the corner points of a given polygon. Given tha
There is no unique solution for a concave polygon:
The convex polygon could be find uniquelly as the convex hull of the points (if you know that the points build a convex polygon).
There is no unique solution so there is no simple algorithm. You could try to somehow mimic your intuition.
Both methods don't really work in general, they don't even guarantee to avoid intersections. You can try to address this by backtracking, if you detect an obvious error (e.g. an intersection) then backtrack to the last point of decision and take the "second best" approach instead, ....
But again as the solution is not unique, don't expect too much from those heuristics.
The average point for the vertices is easy to compute. Just add all points together and divide through the number of points you just added, this is the average. What you are probably more interested is the center point in the sense of "Center of mass", see below.
To determine the center of mass you first have to define the shape. That means you have to do something like step 1.
An easily implemented method to compute the center point given the polygon is.
A given set of points can generally be joined up many ways to form a non-self-intersecting polygon. You may be out of luck unless you have more information about the kinds of polygons the points could represent.