search for: plotmaze

Displaying 1 result from an estimated 1 matches for "plotmaze".

Did you mean: plotmath
2008 Apr 29
1
A Maze Generator
...everyone's amusement. As written, every point is connected to every other point, so feel free to 'start' and 'finish' anywhere you like. Have fun! --Robert PS. Feel free to pass along suggestions or comments. ---------------------------------------------------------------- plotMaze <- function(z, text=FALSE, lwd=2, ...) { N <- nrow(z) y <- -matrix(rep(1:N, N), N, N, byrow=FALSE)-1 x <- matrix(rep(1:N, N), N, N, byrow=TRUE) plot(1:(N+1), -1:-(N+1), type="n", ylab="", xlab="", axes=FALSE, ...) segments(1, -1:-(N+1) ,...