Main Content

Create buffer around points, lines, or `polyshape`

objects

`polyout = polybuffer(`

returns a `P`

,'points',`d`

)`polyshape`

object with boundaries that buffer the 2-D points in
`P`

by a distance `d`

. The
`polybuffer`

function computes the buffer by taking the
union of circles of radius `d`

centered at each point in
`P`

. The first column of the matrix `P`

contains the *x*-coordinates of the points to buffer and the
second column contains the corresponding
*y*-coordinates.

Once you create the `polyshape`

object
`polyout`

, you can analyze its properties or perform
additional computations using `polyshape`

functions. For
example, you can access the vertices that define the buffered shape with the
property `polyout.Vertices`

, and you can plot the shape using
the command `plot(polyout)`

.

`polyout = polybuffer(`

specifies a miter limit when the joint type is specified as
`P`

,'lines',`d`

,'JointType','miter','MiterLimit',`lim`

)`'miter'`

. The miter limit is the maximum allowable ratio
between the distance a joint vertex is moved and the buffer distance
`d`

. The limit `lim`

must be greater than
or equal to 2.

`polyout = polybuffer(`

returns a `polyin`

,`d`

)`polyshape`

object with boundaries that buffer the
input `polyshape`

object `polyin`

by a
distance `d`

. For positive values of `d`

,
solid region boundaries of `polyin`

expand by
`d`

units, and hole boundaries shrink by
`d`

units. Negative values of `d`

shrink
solid boundaries and expand hole boundaries.