Please enable JavaScript to view this site.

Knowledge Base

Returns a polygon that has grown or shrunk by a specified amount. The polygon is stretched or compressed in a direction normal to every line segment.

 

The polygon vertices are contained in a single matrix of dimension Nx2 (or 2xN), where N >= 3 is the number of vertices. The dimension 2 corresponds to the x,y positions. For example, a square of side length 1 can be described by V = [ 0,0; 1,0; 1,1; 0,1] or V = [ 0,1,1,0;0,0,1,1].

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

out = polygrow(V,dx);

Returns the vertices of a new polygon that has grown by dx. To shrink a polygon, use dx < 0.

 

Example

The following example shows how to stretch a square of side length 1 by 0.1:

V = [ 0,0; 1,0; 1,1; 0,1];

?polygrow(V,0.1);

result: 

-0.1 -0.1 

1.1 -0.1 

1.1 1.1 

-0.1 1.1

 

See Also

Functions, polyarea, centroid, polyintersect, inpoly, polyand, polyor, polydiff, polyxor

Copyright Lumerical Inc. | Privacy | Site Map