Say I have a set of points from a sensor which are all within a margin of error on a 2D plane somewhere in the 3D space. How would I go on about transforming the coordinates of the points onto a 2d coordinate system, so that for example the convex hulls of the points or the distances between the points don't change?
Asked
Active
Viewed 1,281 times
0
-
Is the plane known ? – Sep 05 '18 at 12:59
-
@YvesDaoust not directly, but it could be approximated by finding the centroid of the points and using two other points in the cloud I think – ddominnik Sep 05 '18 at 13:03
-
You think correctly see [How to create 2d plot of arbitrary, coplanar 3d curve](https://stackoverflow.com/a/44559920/2521214) – Spektre Sep 07 '18 at 07:02
1 Answers
2
Assuming you know the equation of the plane (otherwise you can fit it by least-square or other), construct a new coordinate frame as follows:
get the normal vector,
form the cross product with an arbitrary vector having a different direction;
form the cross product of the normal and the second vector,
normalize all three and name the new axis z, x, y.
This creates an orthonormal basis to which you will transform the points. This corresponds to a rigid transform, that preserves all distances. You can drop the z to get the orthogonal projections of the points to the plane.