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.
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?
Probably the most common way to do this would be with Principal Component Analysis: https://en.wikipedia.org/wiki/Principal_component_analysis
The short description is:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With