"Matt J" wrote in message <email@example.com>... > "Myles" wrote in message <firstname.lastname@example.org>... > > Hey - so I'm having troubles with what I think is a linear algebra related problem. > > I have a set of points taken from the intersection of a 3D model and 3D plane, I have replotted only the 3D intersection points and have them separated in a specific cell. Anyways, what I would like to do is take this angled plane in 3D and simply reposition the points so that they all lie in the x-y plane - but as they would look when viewed from the normal of the plane. Almost like rotating every point a certain amount so they all lie in the x-y plane and are no longer a 3D set. I'm not sure how to do this, I've been reading up through linear algebra textbooks and thought that transition matrices might work - but I'm not sure how basis vectors for the xy plane could be used to represent a 3D image with a z component. Any help would be greatly appreciated! Thanks. > ================== > > Using this FEX file > > http://www.mathworks.com/matlabcentral/fileexchange/30864-3d-rotation-about-shifted-axis > > you can rotate all the points into the xy-plane as follows > > u=cross(Ztilt, [0 0 1]); > deg=asind(norm(u)); > > NewPoints = AxelRot(YourPoints, deg, u);
All of that seems like it would perfectly - only one thing I don't understand, what do you mean by Ztilt? I get that all of that code is to find the angle between my plane and the xy plane - but I'm not exactly sure how you're meaning to do it. Either way, I appreciate the fast and helpful response!