Main Content

rotate

Rotate mesh about coordinate axes

Description

example

rotatedMesh = rotate(mesh,orient) rotate the mesh object by an orientation, orient.

Examples

collapse all

This example shows how to create an extendedObjectMesh object and rotate the object.

Construct a cuboid mesh.

mesh = extendedObjectMesh('cuboid');

Rotate the mesh by 30 degrees around the z axis.

mesh = rotate(mesh,[30 0 0]);

Visualize the mesh.

ax = show(mesh);

Figure contains an axes. The axes contains an object of type patch.

Input Arguments

collapse all

Extended object mesh, specified as an extendedObjectMesh object.

Description of rotation for an object mesh, specified as:

  • 3-by-3 orthonormal rotation matrix

  • quaternion

  • 1-by-3 vector, where the elements are positive rotations in degrees about the z, y, and x axes, in that order.

Output Arguments

collapse all

Rotated object mesh, returned as an extendedObjectMesh object.

Introduced in R2020a