0

I have two points $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$ representing the ends of an arc. But I also have intermediate points in-between these end points along the arc. I intend to find out the rotation matrix required to align the z-axis parallel to the line joining $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$. I also want know the resulting vector positions of all the intermediate points on this arc after applying the rotation matrix to align the z-axis parallel to the line $(x_2-x_1,y_2-y_1,z_2-z_1). $

Although there have been similar questions answered, I am still not clear with the whole concept and would appreciate a little more details, especially how the rotation matrix is formed.

Sahiba Arora
  • 11,065
  • If you have parameterized the arc with some $f(t)=(x(t),y(t),z(t))$ mapping $[0,1]$ to the arc, then you apply the rotation matrix to $(x(t),y(t),z(t))$. – John Wayland Bales Jun 30 '17 at 20:29
  • As for how to form the rotation matrix, see here: https://math.stackexchange.com/questions/180418/calculate-rotation-matrix-to-align-vector-a-to-vector-b-in-3d You want to rotate normalized $(x_2-x_1,y_2-y_1,z_2-z_1)$ onto $(0,0,1)$. – John Wayland Bales Jun 30 '17 at 21:19
  • The rotation that you describe is not unique, so it doesn’t quite make sense to speak of “the” rotation matrix. – amd Jun 30 '17 at 23:32
  • I have read up how to derive the rotation matrix. In my case I am doing a two-stage rotation about the y and X-axis as my objective is to get the line joining by the ends of the arc to be parallel to the Z-axis. My rotation angles are -ArcCos(z/r) about the y-axis and Pi/2- ArcCos(y/r) about x-axiis; where z= z2-z1, y=y2-y1 and r is the magnitude of the line. I am applying the rotation matrix to all the points on the arc. However I found that the rotated arc is not quite the same as before the rotation ( apart from the orientation) – blessedk Jul 01 '17 at 02:19

0 Answers0