title: Sorting a List of 3d coplanar points to be clockwise or counterclockwise
body: <p>I have a list of 3D points. I know they are all coplanar. I have the center that I want to sort them around and the normal to the plane on which the points and the center lie. How can I test if one point is right (or left) of another point?</p>
  
  <p>I understand how to do it in 2D. <a href="https://stackoverflow.com/questions/6989100/sort-points-in-clockwise-order">Sort points in clockwise order?</a> explains how to compare 2d points. So I think I need to somehow covert all the points and the center to local 2d plane coordinates. How can I do that? Is it the most efficient way to solve this problem?</p>
  
  <pre><code>//from link:
  // a and b are points
  //center is the center around which to determine order
  //int num = (a.x-center.x) * (b.y-center.y) - (b.x - center.x) * (a.y - center.y);
  //if num=0 then they're on the same line
  //if num &lt;0 or num&gt;0 then a is to the left or right of b
  </code></pre>
  
  <p>How would I adapt this to handle 3d coplanar points?</p>