Just a small homework problem, /sci/. I know how /sci/ loves helping people with their homework.
Given two sets of three corresponding points, with each set in a different right-handed coordinate system, how would one go about computing the rigid transform which takes a point in one system and brings it over to the other system?
1: first coord system {x,y,z}
2: second coord system {x',y',z'}
say (2P) = a point in the second coord system (3x1)
let (1P) = (2P) relative to first coord system (3x1)
then (1P)* = (1T2)(2P)*
where (1T2) = transformation matrix given by
1T2=[1R2 | v] is a 4x4 matrix, 1R2 is a rotation matrix(3x3)
[000 | 1] v is a vector from the origin of system 1 to
the origin of system 2
note that since (1T2) is 4x4 and our original points are 3x1,
to make the matrix multiplication work, we let
(2P)* = [x',y',z',1]^T = [(2P),1]^T <- T is for transpose
(1P)* = [x,y,z,1]^T = [(1P),1]^T
wiki euler angles to find out how to calculate 1R2, 2R1
an equivalent way would be to use:
Given the point (2P) (p in coordinates 2)
we find (1P) (p in coordinates 1) by
(1P) = (1R2)(2P) + v
where
v is a vector from the origin of system 1 to
the origin of system 2
Given the point (1P) (p in coordinates 1)
we find (2P) (p in coordinates 2) by
(2P) = (2R1)(1P) + w
where
w is a vector from the origin of system 2 to
the origin of system 1