Tiling is function to tiling euclidean plane by tiles.

tiling(
  tile,
  n,
  type = "square",
  shift = NULL,
  vector = NULL,
  overlap = FALSE,
  box = rbind(c(-1, -1), c(1, -1), c(1, 1), c(-1, 1), c(-1, -1))
)

Arguments

tile

is sf object that is generated by pattern function

n

number of tiles in each tiling direction. In square tiling in vertical and horizontal direction tile repeated n times.

type

is type is tiling. you can set "square" for square tiling , "hexagonal" for hexagonal tiling.

overlap

is a Boolean variable that removes the boundary between polygons if it is TRUE.

box

is boundary box that contains tile

Value

sf object

Examples

# Square Tiling
library(ggplot2)
tile <- motif(theta = 45, delta = 0.5, polyLine = T)
tiles <- tiling(tile, n = 5)
tilePlotter(tiles)
#> Coordinate system already present. Adding new coordinate system, which will replace the existing one.

s3 = sqrt(3)
# Hexagonal Tiling
hexagonal = rbind(c(-1,0), c(1,0), c(2,s3), c(1,2*s3), c(-1,2*s3),c(-2,s3),c(-1,0))
tile <- motif(theta = 60, n = 6, delta = 0.2,
                 box = hexagonal, dist = 0.05, polyLine = F)
tiles <- tiling(tile,n = 2, type = "hexagonal", box = hexagonal)
tilePlotter(tiles)
#> Coordinate system already present. Adding new coordinate system, which will replace the existing one.