powered by
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.
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) )
The number of points to generate
Coefficient vector of length 4
Probability vector of length 4
# NOT RUN { fractal_fern() # }
Run the code above in your browser using DataLab