Learn R Programming

aRtsy (version 0.2.4)

canvas_maze: Draw Mazes

Description

This function draws a maze on a canvas.

Usage

canvas_maze(
  color = "#fafafa",
  walls = "black",
  background = "#fafafa",
  resolution = 20,
  polar = FALSE
)

Value

A ggplot object containing the artwork.

Arguments

color

a character specifying the color used for the artwork.

walls

a character specifying the color used for the walls of the maze.

background

a character specifying the color used for the background.

resolution

resolution of the artwork in pixels per row/column. Increasing the resolution increases the quality of the artwork but also increases the computation time exponentially.

polar

logical, whether to use polar coordinates. Warning, this increases display and saving time dramatically.

Author

Koen Derks, koen-derks@hotmail.com

References

https://github.com/matfmc/mazegenerator

See Also

colorPalette

Examples

Run this code
# \donttest{
set.seed(1)

# Simple example
canvas_maze(color = "#fafafa")
# }

Run the code above in your browser using DataLab