David, let me introduce you to geom3d. I'm a fan of, user of, and occasional contributor to it.
With it you can do something like the following:
points=[0 0 3; 0 1 2.6; 0 1.3 2.3; 0 2.2 1 .8; 0 2.5 0.8; 0 2.8 0; 0 2.2 -0.8; 0 1.9 -1.1; 0 1.3 -1.8; 0 1 -2.5; 0 0 -3; 0 -0.5 -2.7; 0 -1.1 -2.3; 0 -1.8 -1.8; 0 -2.1 -1; 0 -2.5 0; 0 -2.2 0.5; 0 -1.8 1.8; 0 -1.5 2.3; 0 -0.8 2.8;0 0 3];
vec1=[-0.8994 -0.1332 0.4160];
vec2=[0.0254 -0.9668 -0.2540];
myPlane = [0 0 0 vec1 vec2];
TF = createBasisTransform(myPlane,'global')
newPoints = transformPoint3d(points, TF)
I have a feeling that the above isn't quite what you're looking to do (i'm not sure if you're trying to transform points from or to a global plane...), but I think it will help. By any chance are you trying to make a curved planar reformation?
Best Answer