Translate mesh along coordinate axes
translatedMesh = translate(mesh,deltaPos)
example
translatedMesh = translate(mesh,deltaPos) translates the object mesh by the distances specified by deltaPos along the coordinate axes.
translatedMesh
mesh
deltaPos
collapse all
This example shows how to create an extendedObjectMesh object and translate the object.
extendedObjectMesh
Construct a cuboid mesh.
mesh = extendedObjectMesh('cuboid');
Translate the mesh by 5 units along the negative y axis.
mesh = translate(mesh,[0 -5 0]);
Visualize the mesh.
ax = show(mesh); ax.YLim = [-6 0];
Extended object mesh, specified as an extendedObjectMesh object.
Translation vector for an object mesh, specified as a three-element, real-valued vector. The three elements in the vector define the translation along the x, y, and z axes.
Data Types: single | double
single
double
Translated object mesh, returned as an extendedObjectMesh object.
applyTransform
join
rotate
scale
scaleToFit
show
You have a modified version of this example. Do you want to open this example with your edits?