maze2binary {mazing}R Documentation

Convert maze to binary matrix

Description

A function to convert a maze object into a binary matrix. This can be useful for visualization (as when plotting the walls of the maze) and for constructing complex mazes, such as a maze-within-a-maze.

Usage

maze2binary(m)

Arguments

m

A maze object.

Value

A binary matrix where values of 1 denote paths through the maze and values of 0 denote the walls (impassable regions) of the maze.

Examples

m <- maze(10,10)
m2 <- maze2binary(m)


[Package mazing version 1.0.5 Index]