Last active
March 4, 2021 04:34
-
-
Save djnavarro/56bc5ea0b224d387f5fb8d0e6b84ff45 to your computer and use it in GitHub Desktop.
autumnal voronoi tree
This file contains 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
library(flametree) | |
library(voronoise) | |
library(ambient) | |
library(scico) | |
library(dplyr) | |
theme_mono <- voronoise:::theme_mono | |
ft <- flametree_grow( | |
seed = 333, | |
time = 5, | |
scale = c(.5, .8, .9, .9), | |
angle = c(-20, 15, 20, 35), | |
split = 4 | |
) %>% mutate( | |
x = normalise(coord_x), | |
y = normalise(coord_y) | |
) | |
lf <- ft %>% filter(id_leaf, id_step == 2) | |
vt <- ggplot(lf, aes(x, y)) + | |
geom_voronoise( | |
mapping = aes(fill = seg_col), | |
max.radius = .01, | |
expand = -.0002, | |
radius = 0 | |
) + | |
geom_voronoise( | |
mapping = aes(fill = seg_col), | |
max.radius = .01, | |
expand = -.001, | |
radius = 0, | |
perturb = perturb_float( | |
angles = c(-90, -120), | |
noise = c(5, 1) | |
) | |
) + | |
geom_bezier( | |
mapping = aes( | |
group = id_path, | |
size = .1 + seg_wid * 6 | |
), | |
lineend = "round", | |
data = ft, | |
show.legend = FALSE) + | |
geom_point(size = .2) + | |
scale_size_identity() + | |
scale_fill_scico() + | |
theme_mono("antiquewhite") + | |
coord_equal() | |
ggsave( | |
filename = "~/Desktop/vt_02.png", | |
plot = vt, | |
width = 100/3, | |
height = 100/3, | |
dpi = 150 | |
) |
Author
djnavarro
commented
May 30, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment