Hello,
I have a plane and I want to rotate that plane around an arbitrary axis by a specific angle.For my axis, I do have two points where I can define my axis A and B, and doesn’t start from the (0,0,0).
I try to generate my Rotation matrix I user https://en.wikipedia.org/wiki/Rotation_matrix#Axis_and_angle formula and a translation, but unfortunately, it is not working. Do you have any reccomendation?
You’ll find the formulas for this in computer graphics textbooks and presentations (this one for example looks right). The basic idea is to make a vtkMatrix4x4 for a linear transform node that is the concatenation of several operations. First translates one point of the line to the origin, then rotate the line to so it is on one of the main axes, then rotate around that axis and then apply the inverse rotations and translation. This should just be a series of matrix multiplies.