put_tile: Transform a tile.

Description Usage Arguments Value Examples

View source: R/put_tile.R

Description

Transform a tile.

Usage

1
put_tile(tile_in, scale = 0.25, rotate = FALSE, x = 0, y = 0)

Arguments

tile_in

Data.frame with two columns (x and y) and three rows (one for each dot)

scale

Numeric between 0 and 1

rotate

Boolean specifying whether to relect tile in the y axis (i.e. turn upside down)

x

Numeric between 0 and 0.75 for horizontal translation

y

Numeric between 0 and 3^.5/2 (the height of an equilateral triangle of unit side length) for vertical translation

Value

A transformed tile

Examples

1
2
3
4
5
6
r <- (2*3^.5+4)^-1
h <- r * (3^.5+1)
big_tile <- data.frame(x = c(.5-r, .5, .5+r),
                       y = c(h, r, h))

put_tile(tile = big_tile, rotate = TRUE, x = .125)

jsphdms/edger documentation built on May 28, 2019, 5:40 a.m.