X <- if(interactive()) chicago else spiders
b <- distbdry(X)
plot(X %mark% b, main=expression(distbdry(X)),
pch=16, size=1, cols=topo.colors(128))
L <- domain(X)
V <- vertices(L)
d <- vertexdegree(L)
Terminal <- V[d == 1]
points(Terminal, pch=2, col="red")
Run the code above in your browser using DataLab