%% Create and Visualize Cylinder Collision Geometry
% Create a cylinder collision geometry centered at the origin. The cylinder is 4 meters long with a radius of 1 meter.

rad = 1;
len = 4;
cyl = collisionCylinder(rad,len)

%
% Visualize the cylinder.

show(cyl)
title('Cylinder')

%
% Create a homogeneous transformation that corresponds to a clockwise rotation of \pi/4 radians about the y-axis. Set the cylinder pose to the new matrix. Show the cylinder.

ang = pi/4;
mat = axang2tform([0 1 0 ang]);
cyl.Pose = mat;
show(cyl)

% Copyright 2019 The MathWorks, Inc.