spirograph: Draw Spirograph

View source: R/spirograph.R

spirographR Documentation

Draw Spirograph

Description

Draw Spirograph using ggplot2. See reference at https://blog.csdn.net/w573719227/article/details/104584879

Usage

spirograph(R = 25, r = 12, p = 5, col = "skyblue", width = 0.2)

Arguments

R

outer circle radius, should only contain one value

r

numeric vector of inner circle radius

p

numeric vector of distance between pen-point and center of inner circle

col

character vector of line color

width

numeric vector of line width. Typically, r, p, col and width should be the same length, but you can only provide r and p to use default color and line width.

Author(s)

Yujie Liu

Examples

spirograph()
spirograph(31, seq(11, 20, 2), seq(6, 15, 2))


liuyujie0136/tinyfuncr documentation built on Dec. 13, 2024, 8:49 a.m.