canvas_watercolors: Draw Watercolors

View source: R/canvas_watercolors.R

canvas_watercolorsR Documentation

Draw Watercolors

Description

This function paints watercolors on a canvas.

Usage

canvas_watercolors(
  colors,
  background = "#fafafa",
  layers = 50,
  depth = 2,
  resolution = 250
)

Arguments

colors

a string specifying the color used for the artwork.

background

a character specifying the color used for the background.

layers

the number of layers of each color.

depth

the maximum depth of the recursive algorithm.

resolution

resolution of the artwork in pixels per row/column. Increasing the resolution increases the quality of the artwork but also increases the computation time exponentially.

Value

A ggplot object containing the artwork.

Author(s)

Koen Derks, koen-derks@hotmail.com

References

https://tylerxhobbs.com/essays/2017/a-generative-approach-to-simulating-watercolor-paints

See Also

colorPalette

Examples


set.seed(1)

# Simple example
canvas_watercolors(colors = colorPalette("tuscany2"))



aRtsy documentation built on Aug. 21, 2023, 9:08 a.m.