# vertices

From spatstat v1.12-5
by Adrian Baddeley

##### Vertices of a Window

Finds the vertices of a window

##### Usage

`vertices(w)`

##### Arguments

- w
- A window.

##### Details

This function computes the vertices (`corners') of a spatial window.

The argument `w`

should be a window (an object of class
`"owin"`

, see `owin.object`

for details).

If `w`

is a rectangle, the coordinates of the
four corner points are returned.

If `w`

is a polygonal window (consisting of one or more
polygons), the coordinates of the vertices of all polygons are
returned.

If `w`

is a binary mask, then a `boundary pixel' is defined to be
a pixel inside the window
which has at least one neighbour outside the window. The coordinates
of the centres of all boundary pixels are returned.

##### Value

- A list with components
`x`

and`y`

giving the coordinates of the vertices.

##### See Also

##### Examples

```
data(letterR)
vert <- vertices(letterR)
plot(letterR, main="Polygonal vertices")
points(vert)
plot(letterR, main="Boundary pixels")
points(vertices(as.mask(letterR)))
```

*Documentation reproduced from package spatstat, version 1.12-5, License: GPL (>= 2)*

### Community examples

Looks like there are no examples yet.