Move shape to new location
Create and Transform Polygon
Create a polygon using
antenna.Polygon with vertices at
[-1 0 0; -0.5 0.2 0; 0 0 0] and display it.
p = antenna.Polygon(Vertices=[-1 0 0; -0.5 0.2 0; 0 0 0])
p = Polygon with properties: Name: 'mypolygon' Vertices: [3x3 double]
show(p) axis equal
Mesh the polygon and display the meshed shape.
Move the polygon to a new location on the X-Y plane.
translate(p,[2,1,0]) axis equal
shape — Shape created using shape objects
2-D and 3-D geometric shapes created using shape objects in Custom 2-D and 3-D Antenna catalog.
locationpoints — Translation vector
Translation vector, specified as a three-element vector.
[0 1 1]
c — Resultant shape
Resultant shape obtained after the translate operation on the input shape, returned as a shape object.
Introduced in R2017a