Design Tile Pattern

motif(
  box = rbind(c(-1, 0), c(1, 0), c(1, 2), c(-1, 2), c(-1, 0)),
  midpoint = c(0, 0),
  theta = 30,
  delta = 0.2,
  n = 4,
  dist = 0.001,
  circle = FALSE,
  radius = NULL,
  polyLine = F,
  drawBox = FALSE,
  cropBox = NULL
)

Arguments

box

the polygon that the shape constructed by it.

midpoint

is one point in boundary box that basis lines are constructed.

theta

the angle of basis lines in degree between 0 to 90.

delta

the distance of basis lines between 0 to 1 (it depend on boundary box).

n

the number of sides of polygon.

dist

is the size of interior lines.

circle

is a Boolean variable that makes regions based on the intersection of circles instead of lines.

radius

the double variable that if is not null, sets the line length or radius of the circle.

drawBox

to show boundary box set it TRUE.

cropBox

the polygon that the motif is cropped by it.

Value

Examples

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

tile <- motif(theta = 45, delta = 0.5, dist = 0.05, polyLine = F)
tilePlotter(tile)
#> Coordinate system already present. Adding new coordinate system, which will replace the existing one.

s3 = sqrt(3)
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 = 45, n = 6, delta = 0.2, midpoint = c(0,0),
                box = hexagonal, drawBox = T, polyLine = T)
tilePlotter(tile)
#> Coordinate system already present. Adding new coordinate system, which will replace the existing one.