Show collision geometry
Create a cylinder collision geometry. The cylinder has a length of 3 meters and a radius of 1 meter.
cyl = collisionCylinder(1,3);
Show the cylinder.
Show the cylinder in a new figure, and return the patch object that represents the cylinder. Change the cylinder color to cyan by changing the RGB value of the
FaceColor field in the patch object. Hide the edges by setting
figure [~,patchObj] = show(cyl); patchObj.FaceColor = [0 1 1]; patchObj.EdgeColor = 'none';
geom— Collision geometry
Collision geometry to show.
AX— Axes on which to plot
Axes in which to plot the collision geometry, specified as an
patchobj— Graphic object
Graphic object that represents the collision geometry, returned as a
Patch object. For more information, see Patch Properties.