I have a set of points which comprise a (in theory) co-planar curve. My problem is that the plane is arbitrary and can move between each time I collect the data (these points are being collected from a camera). I was wondering if you guys could help me figure out how to:
- find the plane which is closest to the one which these points are co-planar on
- project the points on this plane in such a way that gives me a 2-d curve
I believe that I know how to do point 2, it is really mainly point 1 that i'm struggling with, but I wouldn't mind help on the second point as well.
Thanks a ton!
find 3 points
A,B,C
in your dataThey must not be on single line and should be as far from each other as possible to improve accuracy.
construct
U,V
basis vectorsnormalize
make
U,V
perpendicularconvert your data to
U,V
planesimply for any point
P=(x,y,z)
in your data compute:in case you need also the reverse conversion:
In case you want/have an origin point
A
the conversions would be:That will map
A
to(0,0)
in your 2D coordinates.In case you do not know your vector math look here:
at the bottom you will find the equation for vector operations. Hope that helps ...