1.显示茶壶点云
ptCloud = pcread(\'teapot.ply\');
figure(1)
pcshow(ptCloud);
title(\'Teapot\');
2.Create a transform object with 30 degree rotation along z -axis and translation [5,5,10].
创建一个沿z轴旋转30度并平移的变换对象[5,5,10].
A = [cos(pi/6) sin(pi/6) 0 0; ...
-sin(pi/6) cos(pi/6) 0 0; ...
0 0 1 0; ...
5 5 10 1];
tform1 = affine3d(A);
3.Transform the point cloud.
ptCloudTformed = pctransform(ptCloud,tform1);
figure(2);
pcshow(ptCloudTformed);
title(\'Transformed Teapot\');