gen_checkerboard: Generate a checkerboard pattern

View source: R/pattern-checkerboard.R

gen_checkerboardR Documentation

Generate a checkerboard pattern

Description

This generator supplies 0 or 1 value depending on the provided coordinates position on a checkerboard. The frequency determines the number of squares per unit.

Usage

gen_checkerboard(x, y = NULL, z = NULL, t = NULL, frequency = 1, ...)

Arguments

x, y, z, t

The coordinates to get pattern from

frequency

The frequency of the generator

...

ignored

Value

A numeric vector

See Also

Other Pattern generators: gen_spheres(), gen_waves()

Examples

grid <- long_grid(seq(1, 10, length.out = 1000), seq(1, 10, length.out = 1000))
grid$chess <- gen_checkerboard(grid$x, grid$y)

plot(grid, chess)


thomasp85/ambient documentation built on Sept. 14, 2022, 8:02 a.m.