Reputation: 433
I have a scatter-plot with the code shown below.
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
x = np.random.rand(100)
y = np.random.rand(100)
z = np.random.rand(100)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
scatter = ax.scatter(x, y, z, c='r', marker='o')
plt.show()
We can say
A = np.column_stack((x, y, z)).
Additionally, I have a matrix B, which equals the matrix A times a rotation operation, a shift operation + noise.
B = A x rot(X) + shift(Y) + Noise
If only matrix A and B are given, how can I find the necessary rotation angle and shift vector to overlap matrix B with matrix A / revert the operations on matrix B? Is a center of mass approach best or what would be the recommended approach?
Upvotes: 2
Views: 24