Featured image of post Random Digital Beauty: Experimenting with Generative Art

Random Digital Beauty: Experimenting with Generative Art

When surprisingly beautiful things emerge from partially random code

if (!require("aRtsy")) install.packages("aRtsy")
library(aRtsy)

Let’s play with R to create some random, but still beautiful art 😉 we will be using simple methods here, but we could also use neural networks to create highly sophisticated art. Personally, I do prefer simple art forms, based on patterns, shapes and colors and organized through simple rules. Overall, this kind of art can be surprisingly good and in some cases quite spectacular. I think it’s really cool and truly worth exploring.

Generative Art refers to artwork that has been created algorithmically, often with the aid of a computer and widely available software. It can be easy to create very beautiful and detailed works with just a few simple rules and some basic programming knowledge. Ranging from the highly chaotic to the extremely ordered and blending everything in between, generative art reflects many of the rules and patterns we observe in nature and strikes a beautiful balance between science and art. - Sam Wasserman

One overly simple but useful definition is that generative art is art programmed using a computer that intentionally introduces randomness as part of its creation process. - Artnome

There are many ways of generating art with R.
A very cool and easy one is probably to use the aRtsy package. Small demonstration:

set.seed(100)
canvas_collatz(colors = colorPalette("neon1"), background = 'black', n = 500)

set.seed(16)
canvas_chladni(colors = colorPalette("neon2"), waves = 4)

# see ?canvas_chladni for more input parameters of this function
set.seed(100)
canvas_flow(colors = colorPalette("neon2"), background = 'black',lwd = 2)

# see ?canvas_flow for more input parameters of this function
set.seed(100)
canvas_flow(colors = colorPalette("kpd"), background = 'white',lwd = 0.2, lines= 3000, iterations = 300)

set.seed(100)
colors <- list(
  colorPalette("neon1"),
  colorPalette("neon2"),
  colorPalette("retro3"),
  colorPalette("jasp")
)
canvas_planet(colors,
  radius = c(800, 350, 150, 150),
  center.x = c(1, 500, 1100, 900),
  center.y = c(1400, 500, 1000, 50),
  starprob = 0.01,
  resolution = 1000
)

set.seed(1)
canvas_stripes(colors = colorPalette("neon2"),H = 3)

set.seed(1)
canvas_phyllotaxis(colors = colorPalette("neon2"), background = 'black', size = 0.3)

canvas_recaman(colors = colorPalette("nature"), background = 'black', iterations = 200, curvature = 1.1)

canvas_turmite(colors = colorPalette("nature"))

canvas_watercolors(colors = colorPalette("jasp"), background = 'black', layers = 100)

canvas_diamonds(colors = colorPalette("tuscany1"))

canvas_function(colors = colorPalette("neon2"), background = 'black')

canvas_polylines(colors = colorPalette("neon2"), iterations = 50, background = 'black')

canvas_ribbons(colors = colorPalette("dark1"))

canvas_squares(colors = colorPalette("random", 10), cuts = 100)

canvas_nebula(colors = colorPalette("tuscany1"))

canvas_circlemap(colors = colorPalette("neon2"))

canvas_mandelbrot(colors = colorPalette("tuscany1"), iterations = 100, zoom = 0.06)

aRtsy package reference

Another way of making generative art would be through generative adversarial networks (link). Here’s an example of what you could make, using some text as input to a pre-trained model:

Or even dynamic art like this (link).

Here are a two Colab notebooks to experiment with that kind of more advanced, more psychedelic and sometimes slightly nightmarish art. Pick your words wisely 😉 :

And here’s a subreddit entirely dedicated to AI-generated art

There you go, you’re set for creating your own NFT collection and Metaplex store ! web3 + AI, ain’t that a neat combo ? 😝

Thanks for reading ! 😊👋

Anas EL KHALOUI

Licensed under CC BY-NC-SA 4.0
Généré avec Hugo
Thème Stack conçu par Jimmy