title: How to find out if a set of point3D are in the same plane?
body: <p>I have a set of point3D (X, Y, Z). I need to check if they are coplanar with some sort of tolerances. My way of doing it is that: I convert all points from the Global Coordinate System to Local one, where local x,y is in the same plane of the plane defined by 3 points in the set, and z is normal to that plane. And then, all I need to do is to check if all points in the set have approximately similar local z values. </p>
  
  <p>However, the tricky part is how to pick the 3 points to define the reference plane. If picked randomly, this would result in sometimes the set of points are coplanar, sometimes not. Do you have any suggestion?</p>