The Art in Randomness

Dorit Geifman
3 min readDec 19, 2021

--

Getting started with generative art

Several months ago I decided to combine my love of mathematics programming and art and dive into the world of generative art. And what a hell of a dive it was, I nearly drowned. Should I start with recursive functions? fractals? parametric and differential equations? image processing? What programming language should I use? R, my “native” language or Processing, a language geared towards computational art.

After going around the bush for quite some time, I came across the blogpost by Danielle Navarro, Unpredictable Painting, a kind introduction to generative art creation. There she suggests: Do something, anything.

And I followed her advice.

Selecting the programming language was easy. I decided to stay in my comfort zone and use R. Another obvious decision was to start with an object that incorporates randomness because randomness is the essence of generative art.

So here we go with my first object: a set of random points bound in ellipse and assigned to a number of groups. A common point connects to each of the points to form segments. Several structural and visual parameters provide the controls for randomness and visualization.

build_obj <- function(n_points = 100,
n_groups = 10,
radius_x = 10,
radius_y = 10,
start_x = 0,
start_y = 0)
{
# random ellipse parameters
x = runif(n_points) * radius_x
y = runif(n_points) * radius_y
a = runif(n_points) * 2*pi
groups <- tibble(group = 1:n_groups, rind = runif(n_groups))

# data frame
segments <- tibble(x = x*cos(a), y = y*sin(a)) %>%
mutate(sx = start_x, sy = start_y,
group = sample(1:n_groups, n_points, replace = TRUE)) %>%
left_join(groups)

return(segments)
}

See the full code that includes the ggplot parameters

Running the program again and again while randomizing the starting point, the alpha levels or playing with the curvature of the segments resulted in many different drawings out of which I selected the four displayed on top.

But is this ART?

Van Gogh put his soul into his drawings

Starry night by Vincent Van Gogh

Duchamps wanted to make a point with his art

The fountain by Marcel Duchamp

but I was pushing a button again and again while changing parameters and waiting for the computer to generate something nice.

I will argue that my art lies in the ability to express the beauty of mathematics and programming in visual terms by knowing what objects to create and which controls to build into them in order to generate the artwork.

A morning after a stormy night by Dorit Geifman

I was taking my morning walk after a rainy night. The sky was crispy blue with floating white clouds touched by grey. The trees were wet and shiny. The green leaves of the pecan trees were turning yellow, waiting for their turn to fall and the canopy of the olive trees was full with green leaves, striked by silver

So that is my art

And neither should serendipity be underrated. Changing colors and adding motion resulted in this dramatic revolving spider

To conclude, I am happy with what I achieved this far. The artworks may not be very sophisticated and I still have a lot to learn, but it is the first step in a long and fulfilling journey into the world of generative art

--

--