class: center, middle, inverse, title-slide # Generative Art ## Creating art with the R programming language ### Nick Paterno ### Pacific Lutheran University ### Sept 29, 2021 --- class: main ## What is Generative Art? ### 1950's - Ellsworth Kelly * Starting in 1951, Kelly created a series of eight pieces titled "Spectrum Colors Arranged by Chance I to VIII". -- <figure> <img alt="One of eight pieces from Ellsworth Kelly's 'Spectrum of Colors Arranged by Chance'." src="images/kelly.jpeg" class= "img_center_2"/> <figcaption>"Spectrum of Colors Arranged by Chance VI", Kelly</figcaption> <figure/> --- class: main ## What is Generative Art? ### 2021 - Ellsworth Kelly Recreated in R <img alt="Digital recreation of Kelly's methodology using R" src="images/kelly_r.png" width="65%"/> --- class: main ## What is Generative Art? ### 2021 - Ellsworth Kelly Recreated in R ```r # Generate data frame with random values for color color_data <- sample(1:18, 1600, replace = TRUE) df <- data.frame(expand.grid(0:39, 0:39)) plot_data <- df %>% mutate(color_data = as.integer(color_data)) # Generate colors clrs = grDevices::colors()[grep('gr(a|e)y', grDevices::colors(), invert = T)] plot_clrs = sample(clrs, 18) # Generate Plot ggplot(plot_data) + geom_rect(aes(xmin = Var1, xmax = Var1+1, ymin = Var2, ymax = Var2+1), fill = plot_clrs[color_data])+ theme_void() ``` --- class: main ## What is Generative Art? ### 1965 - Georg Nees * In 1965, *Computergrafik* was the first exhibition world-wide of generative art created with the use of a digital computer. -- <figure> <img alt="A computer generated image titled 'Andreaskreuz' of many lines forming a cross. Created by Georg Nees." src="images/nees.jpeg" class= "img_center_2"/> <figcaption>"Andreaskreuz", Nees</figcaption> <figure/> --- class: main ## What is Generative Art? ### 2003 - Mark Napier * Napier translated the Old Testament, New Testament and the Koran into binary data and used the stream of 1's and 0's to drive a black and white line on the screen. -- <figure> <img alt="Black and White by Mark Napier." src="images/napier_black_white.png" class= "img_center_2"/> <figcaption>"Black and White", Napier</figcaption> <figure/> --- class: main ## Thomas Lin Pedersen <a href="https://www.data-imaginist.com/art"> <img alt="Art: prism267 by Thomas Lin Pedersen" src="images/tlp.png" class="img_center"/> <a/> I’m a generative artist focusing mainly on exploring the beauty of dynamic systems. For me, the sweet spot of generative art lies in creating a system that you know well enough to set it up for success, but is so complex that you still get surprised when you see the result. --- class: main ## Danielle Navarro <a href="https://art.djnavarro.net"> <img alt="Art: hearts by Danielle Navarro" src="images/djn.png" class="img_center"/> <a/> --- class: main ## Jasmines ### A package by Danielle Navarro <img alt="A plot generated with the Jasmines R package" src="images/jasmines.png" class="img_center"/> --- class: main ## Flametree ### A package by Danielle Navarro <img alt="A flametree image." src="images/flametree_example.png" class="img_center"/> --- class: main ## Basics I ### Start with trig functions <img alt="A plot from trig functions." src="images/basic.png" class="img_center"/> -- `\(x = 1-sin(x^2)+cos(y^2)\)` `\(y = -cos(y*x^2)-sin(y)\)` --- class: main ## Basics II ### Adding polar coordinates <img alt="Trig plot in polar coordinates." src="images/polar.png" class="img_center"/> --- class: main ## Basics III ### Adding color <img alt="Final colorized plot." src="images/color.png" class="img_center"/> --- class: main ## Non-linear Dynamics: ### Clifford Attractor <img alt="A plot of a Clifford Attractor using 10 million data points" src="images/clifford.png" class="img_center"/> --- class: main ## Non-linear Dynamics: ### Lorenz Attractor <img alt="A plot of a Lorenz Attractor using 1 million data points" src="images/basic_lorenz.png" class="img_center"/> --- class: main ## Non-linear Dynamics: ### Lorenz Attractor <img alt="A plot of a Lorenz Attractor using 1 million data points" src="images/lorenz_colorized.png" class="img_center"/> --- class: main ## Non-linear Dynamics: ### Lorenz Attractor <img alt="A plot of a Lorenz Attractor using 1 million data points" src="images/lorenz_alt.png" class="img_center"/> --- class: inverse # Thank you! ### Slides available at [npaterno.github.io/left_coast_stats](https://npaterno.github.io/left_coast_stats) ### Code available at [github.com/npaterno/generative_art_talk](https://github.com/npaterno/generative_art_talk) ### Questions?