canvas_nebula {aRtsy}R Documentation

Draw Nebulas

Description

This function creates an artwork from randomly generated k-nearest neighbors noise.

Usage

canvas_nebula(
  colors,
  k = 50,
  n = 500,
  resolution = 500
)

Arguments

colors

a string or character vector specifying the color(s) used for the artwork.

k

a positive integer specifying the number of nearest neighbors to consider.

n

a positive integer specifying the number of random data points to generate.

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

See Also

colorPalette

Examples


set.seed(1)

# Simple example
canvas_nebula(colors = colorPalette("tuscany1"))



[Package aRtsy version 0.2.4 Index]