Is there an efficient way to multiply many different rotation matrices to the same vector?
Right now I am doing the following, extremely slow procedure
for i, rm in enumerate(ray_rotation_matrices):
scan_point = rm * np.vstack([scale, 0, 0, 1])
scan_points[i] = np.hstack(scan_point[:3])
Each rm
is a 4x4
matrix for homogenous coordinates. Can I somehow broadcast, but how do I make sure it applies matrix multiplication and not element wise product?
I want to get rid of the for loop...