tiling: Tiling of plane by Tiles

Description Usage Arguments Value Examples

View source: R/tiling.R

Description

Tiling is function to tiling euclidean plane by tiles.

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Square Tiling
library(ggplot2)
tile <- motif(theta = 45, delta = 0.5, polyLine = T)
tiles <- tiling(tile, n = 5)
tilePlotter(tiles)
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)

Ehyaei/Kaashi documentation built on Dec. 17, 2021, 6:23 p.m.