Main Content

antenna.Polygon

Create polygon on xy-plane

Description

Use the antenna.Polygon object to create a polygonal board shape centered at the origin and on the xy-plane. You can use antenna.Polygon to create single-layer or multi-layered antennas using pcbStack.

Creation

Description

polygon = antenna.Polygon creates a polygon shape centered at the origin and on the xy-plane.

polygon = antenna.Polygon(PropertyName=Value) sets properties using one or more name–value arguments. PropertyName is the property name and Value is the corresponding value. You can specify several name-value arguments in any order as PropertyName1=Value1,...,PropertyNameN=ValueN. Properties that you do not specify, retain their default values.

For example, pol = antenna.Polygon(Name="polygon-1") creates a polygon with polygon-1 name.

example

Properties

expand all

Name of the polygon board shape, specified as a string.

Example: "Polygon1"

Data Types: string

Cartesian coordinates of polygon vertices, specified as a N-by-3 matrix in meters where N is the number of points.

Example: [-1 0 0; -0.5 0.2 0; 0 0 0]

Data Types: double

Object Functions

addPerform Boolean unite operation on two shapes
subtractPerform Boolean subtraction operation on two shapes
intersectGenerate and plot intersection of two shapes
plusJoin two shapes
minusCarve a shape from other shape
andPerform Boolean intersection operation on two shapes
areaCalculate area of 2-D shapes in square meters
showDisplay antenna, array structures, shapes, or platform
plotPlot boundary of 2-D shape
meshGenerate and view mesh for antennas, arrays, and custom shapes
rotateRotate shape about axis by angle
rotateXRotate shape about x-axis by angle
rotateYRotate shape about y-axis by angle
rotateZRotate shape about z-axis by angle
translateMove shape to new location
scaleChange size of shape by fixed factor
mirrorXMirror shape along x-axis
mirrorYMirror shape along y-axis
removeHolesRemove holes from shape
removeSliversRemove sliver outliers from shape boundary

Examples

collapse all

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: [3×3 double]

show(p)
axis equal

Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Mesh the polygon and display the meshed shape.

mesh(p,0.2)

Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains an object of type patch.

Move the polygon to a new location on the X-Y plane.

translate(p,[2,1,0])
axis equal

Figure contains an axes object. The axes object with xlabel x (m), ylabel y (m) contains 2 objects of type patch. These objects represent PEC, mypolygon.

Version History

Introduced in R2017a