How rotate a cylinder?
18 views (last 30 days)
I have a matrix A [100x3] which represents the coordinates of a cilinder oriented in the space. I have calculated the center of this cylinder by doing C=Mean(A).
My question is how can i rotate the cylinder in order to have origin of the xyz axis in the point C?
Any help would be appreciated,
William on 16 Jan 2021
Lorenzo -- If all you need is to have the center of the cylinder located at the origin of the coordinate system, then what you need is a translation, not a rotation. It would go something like this:
C = mean(A);
Cnew = A - repmat(C,100,1);
If you also needed the cylinder axis to be aligned with one of the coordinate axes, then a rotation would be needed.