canvas_lissajous: Draw a Lissajous Curve

View source: R/canvas_lissajous.R

canvas_lissajousR Documentation

Draw a Lissajous Curve

Description

This function draws lissajous curves with points connected via a k-nearest neighbor approach.

Usage

canvas_lissajous(
  colors,
  background = "#000000",
  iterations = 2,
  neighbors = 50,
  noise = FALSE
)

Arguments

colors

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

background

a character specifying the color used for the background.

iterations

a positive integer specifying the number of iterations of the algorithm.

neighbors

a positive integer specifying the number of neighbors a block considers when drawing the connections.

noise

logical. Whether to add perlin noise to the coordinates of the nodes.

Value

A ggplot object containing the artwork.

Author(s)

Koen Derks, koen-derks@hotmail.com

References

https://en.wikipedia.org/wiki/Lissajous_curve

See Also

colorPalette

Examples


set.seed(13)

# Simple example
canvas_lissajous(colors = colorPalette("blossom"))



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