# This is my first take on generative art in R
::install_github("cutterkom/generativeart")
devtools
library(generativeart)
# This is how the documentation says to run the program
library(generativeart)
# set the paths
<- "img/"
IMG_DIR <- "everything/"
IMG_SUBDIR <- "handpicked/"
IMG_SUBDIR2 <- paste0(IMG_DIR, IMG_SUBDIR)
IMG_PATH
<- "logfile/"
LOGFILE_DIR <- "logfile.csv"
LOGFILE <- paste0(LOGFILE_DIR, LOGFILE)
LOGFILE_PATH
# create the directory structure
::setup_directories(IMG_DIR, IMG_SUBDIR, IMG_SUBDIR2, LOGFILE_DIR)
generativeart
<- list(
my_formula x = quote(runif(100,-100,100) * x_i^sin(x)),
y = quote(runif(100,-100,100) * y_i*cos(y))
)
::generate_img(formula = my_formula,
generativeartnr_of_img = 5, polar = TRUE,
color = "red", background_color = "black")
Generative Art With R
Example Work of My Generative Art:
All of the below images were made entirely in R using the generativeart
R Package which is available on GitHub.
How did I do this?
I have to be honest, I relied very much on the provided documentation of the package and ChatGPT to start working. Cyan Swirls was made using the boilerplate code provided in the documentation of the program.
The first image, which I have titled, The Path to Hell, was made entirely by me. I used a large uniform distribution to run some simple equations in, and set the output colors to red and black in a Polar grid.