Learn R Programming

mathart (version 0.0.0.9000)

fractal_fern: Generate fractal fern data

Description

Generates data for plotting a fractal fern and stores it in a data frame with (x, y) coordinates. Refer to the Wikipedia article for details.

Usage

fractal_fern(
  n = 10000,
  a = c(0, 0.85, 0.2, -0.15),
  b = c(0, 0.04, -0.26, 0.28),
  c_ = c(0, -0.04, 0.23, 0.26),
  d = c(0.16, 0.85, 0.22, 0.24),
  e = c(0, 0, 0, 0),
  f = c(0, 1.6, 1.6, 0.44),
  p = c(0.01, 0.85, 0.07, 0.07)
)

Arguments

n

The number of points to generate

a

Coefficient vector of length 4

b

Coefficient vector of length 4

d

Coefficient vector of length 4

e

Coefficient vector of length 4

f

Coefficient vector of length 4

p

Probability vector of length 4

c

Coefficient vector of length 4

Examples

Run this code
# NOT RUN {
fractal_fern()
# }

Run the code above in your browser using DataLab