Perhaps best asked in three parts:
Given five not necessarily coplanar points (in 3 dimensions), what is a good measure of how close to coplanar they are?
Given another set of five not necessarily coplanar points, how can we assess which of these two sets of five points is “more coplanar”?
Given n sets of five not necessarily coplanar points, how can we order these sets of points from “most coplanar” to “least coplanar”?
Suggestions?
I’m working with sets of five points at a time, but will eventually need to consider more points in these sets.
Is this a well-formulated question? An algorithm would be helpful, especially if coded in Python.
I would start with 3D OBB and try to use its dimensions as metrics
m
. Leta,b,c
be the sides of the OBB then for example I would try this:this will lead to
m
in range<0 , +inf>
where0
means co-planar however the result will be non linear and maybe you should normalize the result by dividing it withV
so you can compare between different PCLsIf you want something linear you can try angle of side and diagonal chose the side with smallest and not biggest side lengths:
this will lead to angle in range
<0deg , 45deg>
where0deg
means co-planar. If you want to have something more precise I would add also the other side angle and combine them somehow for example like this:If you sort the sides so
a<=b<=c
then you can rewrite to: