Learn R Programming

aRtsy (version 0.2.4)

canvas_phyllotaxis: Draw a Phyllotaxis

Description

This function draws a phyllotaxis which resembles the arrangement of leaves on a plant stem.

Usage

canvas_phyllotaxis(
  colors,
  background = "#fafafa",
  iterations = 10000,
  angle = 137.5,
  size = 0.01,
  alpha = 1,
  p = 0.5
)

Value

A ggplot object containing the artwork.

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

the number of iterations of the algorithm.

angle

the angle at which to place the artwork.

size

the size of the lines.

alpha

transparency of the points.

p

probability of drawing a point on each iteration.

Author

Koen Derks, koen-derks@hotmail.com

References

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

See Also

colorPalette

Examples

Run this code
# \donttest{
set.seed(1)

# Simple example
canvas_phyllotaxis(colors = colorPalette("tuscany1"))
# }

Run the code above in your browser using DataLab