# https://www.flickr.com/photos/stringrbelle/49656406813/
#' @rdname rosemary
#' @export
social_distance_02 <- function(dir = NULL, ...) {
dir <- check_dir(dir)
file <- file.path(dir, "social_distance_02.png")
dat <- jasmines::use_seed(255) %>%
jasmines::scene_mix(
n = 500, xpos = 1:80, ypos = 1:80,
grain = 2, size = 1, entity = "circle"
) %>%
jasmines::unfold_tempest(iterations = 50) %>%
dplyr::mutate(x = x/10, y = y/10) %>%
jasmines::unfold_warp(iterations = 30) %>%
dplyr::mutate(sigh = id + ind) %>%
dplyr::filter(time > 10) %>%
dplyr::mutate(time = time - 10)
pal <- jasmines::palette_adjust(
name = "rainbow",
prefix = NULL,
red.f = .5,
blue.f = .8,
green.f = .8
)
dat %>%
jasmines::style_ribbon(
colour = "sigh",
palette = pal,
background = "wheat",
alpha = c(.1, .1)
) %>%
jasmines::export_image(
filename = file
)
cat("image written to:", file, "\n")
return(invisible(NULL))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.