rotate a plane onto another plane
Show older comments
I have a cross section (consisting of nx3 points) that I would like to rotate onto another plane so that it lies parallel to 2 orthogonal vectors. The cross-section is centered at the origin and lies on the y-z plane (x is 0). The big picture is that I want to construct a series of cross sections normal to a curve at several locations along its length. I have the vectors at each point on the curve, now I just need to rotate my cross sections.
I have made several attempts using [4x4] rotation matrices and while I have been able to rotate the cross-section in the direction of 1 of the vectors I've been unable to make my cross section parallel to the 2 orthogonal vectors. I'm now not sure if this is even the right approach to make 1 plane parallel to another. Coupled with the difficulty of visualizing the 3d rotations I've hit a wall.
I have included some of my sample data below and would really appreciate some help and direction on this. Thank you!
David
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]; % points defining the x-section
%orthogonal vectors
vec1=[-0.8994 -0.1332 0.4160];
vec2=[0.0254 -0.9668 -0.2540];
1 Comment
Varoujan
on 25 Aug 2016
I have a similar problem - I am hoping that you guys can recommend a version of the answer to my problem.
Basically, I have a high density x,y,z surface (basically a z-map, i.e., the data is the z height of a surface). For the sake of argument, let's assume x,y range from -100 to 100, in 1 mm steps. At each x,y location, I have a z value. The general shape is something like a potato chip or saddle, i.e., NOT a plane but also NOT random.
This surface moves rigidly over time. Rather than measuring the map every time, we would like to measure a coarse grid, say a 3x3 grid at +/-50 and 0. What we want is to adjust the z values of the high density map such that the full map coincides with the quick map.
I know how I can fit a simple plane to the surface. So, what I did thus far is to fit a plane to the 3x3 map (basically simple left divide or Affine operation). Then, I evaluated the full x,y,z map at the same grid points as the 3x3 map using griddata. What I now get are two sets of coefficients, C1 and C2 of the form: zx = C1(1) * xx + C1(2) * yy + C1(3). I am stuck at this point. I don't know how to shift the full map by somehow using this information.
Accepted Answer
More Answers (0)
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!