title: Finding center of a set of points to sort them clockwise?
body: <p>I want to sort a vector of points in clockwise order to form a polygon but I need the proper center to do so. I have tried the averages method, but a few of the points did not sort correctly at all. What is the correct way to find the center that will work when sorting points in a clockwise manner?</p>
  
  <p>It is failing on the concave parts</p>
  
  <p>Thanks</p>
  
  <p>Here is a picture:
  <img src="https://i.stack.imgur.com/cnIbM.png" alt="enter image description here"></p>
  
  <p>The green circle is the center.</p>
  
  <p>It should look more like this:
  <img src="https://i.stack.imgur.com/5XyfL.png" alt="enter image description here"></p>