DISCLAIMER I am not a mathematician, I am a biomechanist. So please excuse any poor terminology.
I would like to know how to calculate the centre of rotation of a line with endpoints A1 and B1, to a position with endpoints A2 and B2 in 3D, where both rotation and translation of the line may occur simultaneously. For example, the coordinates for A1 are (a1x,a1y,a1z) and so on for the other endpoints.
I have done this in 2D by finding the intersection between the perpendicular bisectors of lines conjoining the adjacent coordinates of the two lines (intersection of perpendicular bisectors of lines (A1,A2) and (B1,B2) Centre of rotation 2D). But is this method also adaptable to 3D coordinates? I cannot find much online regarding this.
Another method I considered was "extending" the two lines and finding the intersection between the extended lines, but this cannot handle line translation.
Thanks!
How about we start by translating the line by the vector $A2-A1$. This translation will move $A1$ to $A2$. After that, we can find a rotation in the plane of $A2, B1, B2$ that will move $B1$ to $B2$. The axis of rotation will be normal of this plane.
Does that sound like what you need?