quiltr: Pattern generator

Description Usage Arguments Value Examples

View source: R/quiltr.R

Description

This function generates a pattern of isoceles right triangles of random colors. Patterns of initial triangle "seed" are then cloned and rotated based on symmetrical patterns.

Usage

1
quiltr(x = 3, y = 3, col = c("#AACBFF", "#E0E0E0"), ...)

Arguments

x

The number of triangles for the seed pattern in the x direction.

y

The number of triangles for the seed pattern in the y direction.

col

A vector of colors for the pattern.

...

Additional parameters to be passed. For example, probability weights can be applied here in vector form.

Value

A list of polygon metadata

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Return a quiltr object
qds <- quiltr()

# Plot the object
qds <- quiltr()
plot(qds)

# Plot with unequal color probabilities
qds <- quiltr(
    x    = 10,
    y    = 10,
    col  = c("#DCD0C0", "#C0B283", "#F4F4F4"),
    prob = c(0.2, 0.7, 0.1)
)
plot(qds, sym = "reflect")

btmonier/quiltr documentation built on May 23, 2019, 9:38 a.m.