library(tidyverse)
Kosmisk Floræ
Generative Art
Generative aRt
R
Or:
- Cosmic Florae
- Flores Cosmiques
- Kosmische Florae
Based on the butterfly curve
<- function(theta){
calc exp(sin(theta)) - 2*cos(4*theta) + sin((2*theta - pi ) /24)^5
}
Prepping data for plot:
<- seq(0,12*pi, 0.1)
A <- calc(A)
r <- seq(0,12*pi, 2.1*pi)
B <- lapply(B, function(x) A - x) %>% unlist() C
The last two lines basically rotates the curve
Plot:
tibble(theta = C, r = rep(r, times = length(C)/length(r))) %>%
ggplot(aes(x=theta, y = r, color = r, alpha = 0.0001)) +
geom_point() +
coord_polar() +
theme_void()+
theme(legend.position = "none",
plot.background = element_rect(fill = "black")) +
scale_color_gradientn(colours = c("red", "blue", "green"))
ggsave("Kosmisk_Floræ-1.png")