View source: R/canvas_lissajous.R
canvas_lissajous | R Documentation |
This function draws lissajous curves with points connected via a k-nearest neighbor approach.
canvas_lissajous(
colors,
background = "#000000",
iterations = 2,
neighbors = 50,
noise = FALSE
)
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. |
A ggplot
object containing the artwork.
Koen Derks, koen-derks@hotmail.com
https://en.wikipedia.org/wiki/Lissajous_curve
colorPalette
set.seed(13)
# Simple example
canvas_lissajous(colors = colorPalette("blossom"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.