Created
March 17, 2020 06:18
-
-
Save djnavarro/9cd828faa67545b36f9a59a17826e686 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/djnavarro/jasmines | |
library(jasmines) | |
library(dplyr) | |
simple_plot <- function(octaves) { | |
dat <- use_seed(259) %>% | |
scene_rows( | |
n = 5, | |
grain = 200 | |
) %>% | |
mutate(ind = 1:n()) %>% | |
unfold_breeze( | |
iterations = 100, | |
scale = .001, | |
drift = 0, | |
fractal = ambient::billow, | |
octaves = octaves | |
) %>% | |
mutate(val = ind + id * 50) | |
dat %>% | |
style_ribbon( | |
palette = palette_adjust( | |
name = "imola", | |
prefix = NULL, | |
red.f = .7, | |
blue.f = .7, | |
green.f = .7 | |
), | |
colour = "val", | |
alpha = c(.25,.02), | |
background = "ghostwhite", | |
type = "point", | |
size = .4 | |
) %>% | |
export_image( | |
paste0("~/Desktop/oct", octaves, ".png") | |
) | |
} | |
for(i in 1:4) simple_plot(i) | |
Author
djnavarro
commented
Mar 17, 2020
Hi! I love it, but I don't know anything about R lang.
Can you explain a little bit how does it works? Which algorithm behind it?
Any pseudocode-ish description would be nice. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment