Complex Systems Inspiration

Alright, so I spent a good chunk of today catching up on readings and searching for inspiration for my complex systems project. And to be completely honest, I’m still not entirely sure what I want to do.

Cellular automata definitely piques my interest. So I’m trying to find a way to create something visually interesting.

I came across Nervous System, “a generative design studio that works at the intersection of science, art, and technology. [They] create using a novel process that employs computer simulation to generate designs and digital fabrication to realize products. Drawing inspiration from natural phenomena, [they] write computer programs based on processes and patterns found in nature and use those programs to create unique and affordable art, jewelry, and housewares.”

nervousEarrings nervousEarrings2 nervousEarrings3

This company also offers an OBJ export library for Processing! Definitely worth checking out.

I also came across the work of Jared Tarbell. His series “Happy Place” caught my attention.

happyPlace0000 happyPlace1000

This directed my thoughts into creating a flocking system using cellular automata rules. Boids could hold a particular state which would be determined by it’s neighbors. Unlike my previous flocking system, the rendered image would be an exposure of the connection between the boids, rather than the boids themselves.

Further research will be needed. I’m not entirely sure which direction I want to go into. I might try a few tests tomorrow.

Painting Boids Retrospective

So, I took a lot of the feedback from today to heart. And even though today was the final presentation for biologically inspired systems, I felt super motivated to improve my program when I got home.

Anywho, here is a video of my program as it stands right now.

The biggest change I incorporated was the color gene. I was struggling with how to incorporate color this weekend. Mainly, how was I going to incorporate a gene that would allow the boids to be different from each other, but still cohesive. However, today during VIZA616 (Rendering and Shading) while Ergun was lecturing on interpolating colors with different hues for our shaders, I realized that I could interpolate between two colors to create color palettes for the boids. I incorporated that into a color picker for the user to manually choose the two colors. However, I completely agree with Phil’s comment about incorporating this into a gene, especially since this is a biologically inspired system. Plus taking away those extra sliders made my interface significantly more simple.

I interpreted my previous color picker idea into six new color genes: hue, hue-variation, saturation, saturation-variation, value, and value-variation. The HSV values would define the mid-color. The variation values would indicate the amount the respective value would vary within the boid system. I set limits to ensure the values stayed between 0 and 1.

So here is a list of my final boid genes:

  • Behavior: separation, alignment, and cohesion force coefficients
  • Shape: height and width of the triangle
  • Color: hue, saturation, value, hue variation, saturation variation, and value variation

Each category has it’s own mutation coefficient slider in order to allow the user more control over the mutation in each generation. I feel like this is appropriate considering the amount of genes.

I also added some minor changes. The mutation sliders are hidden in Canvas Mode. The “No Paint Trail” mode boids are now drawn with a thicker stroke, so they are more readable. The boid simulation also doesn’t restart when this mode is toggled.

I know there is much more than can be further done. Especially to make the GUI itself more aesthetically pleasing. I already plan on fixing the control panel on either a separate window or perhaps on a semi-transparent background. That way there won’t be that awkward line at the top of the boid’s canvas.

Overall, especially with the most recent changes, I am quite pleased with how this project turned out. It is incredibly fun to play with. And I am loving the resulting paintings.

I will try to get a web app up, once I can figure out the best way to do so.

Here are some more screenshots!

v7_mutationMode

v7_canvasMode

v7_noPaintTrail

v7_canvasMode2

v7_noPaintTrail2

(Forgot to show “No Paint Trail” in Mutation Mode in the video above, so here it is below!)
mutationMode_noTrail

Just thought I would add my source code if anyone was curious.

As I had stated in a previous post, I used the flocking example on Processing.org as a starting point.

Unfortunately, WordPress restricts the file types that can be uploaded. I was able to upload my .pde and .csv file as a .doc:

paintingboids.pde

genePool.csv

Painting Boids Update

Here is a preview of my application GUI!

There are now two modes the user can play in.

Mutation Mode:

  • User can change the mutation constant of the behavior or shape of the boid independently.
  • User can mark favorites (by right clicking). These will be used in canvas mode.
  • Color is also assigned by right clicking. The user can specify to colors, the boid generator will interpolate those two colors so that the resulting boids (within that group) have some variation in color among them.
  • The “No Paint Trail” option will allow the user to see the boids movement without them leaving a trail behind them.

applicationPreview

Canvas Mode:

  • All the boid groups marked as favorites can be seen interacting with each other on one canvas.
  • The colors used are the colors defined by the user in Mutation Mode.
  • Clicking on the canvas generates more boids and redefines the respawn point.

canvasMode

Here is a screenshot of the program with the “No Paint Trail” checked. I would like to change this so it displays a thicker stroke. It is hard to see the brushes on some iterations.

noPaintTrail

Here are a few outputs that I was able to produce with my program. =]

v06_colors1

v06_colors2

Generative Art Biologically-Inspired System

I am quite intrigued by flocking systems, and I thought it would be interesting to combine it with a genetic algorithm.

I was inspired by Casey Raes’ “Processing Compendium.” His final pieces are mesmerizing. I love the organic nature of his work. They feel alive; I can imagine their breath.

I decided to first start off with a flocking system. I used the Flocking example on Processing.org as a starting point.

Here are a few of my initial experiments. I essentially used a “brush” of various sizes and shapes to follow each boid. I also played around with border conditions.

01

02

03

04

05

06

07

Here is a video of the system in action:

Now where to go from here?

I have two main ideas:

(1) Genes would control the following parameters:
Brush appearance (length, angle of triangle, color)
Amplitude of forces applied to boid (collision avoidance, velocity matching, flock centering)

(2) Have the entire gene pool interact with each other in one painting.

I will be working on the first idea… then perhaps work towards allowing the user to pick multiple boid types to interact with each other.

NetLogo Exploration: Sunflower Biomorphs

The Sunflower Biomorphs example remained my favorite sample from the NetLogo library.

I decided I would add in another gene to define the petal’s shape. This did prove to be more difficult than I had anticipated, as I did not fully understand the syntax of the program. Where was the shape defined? After poking through the User Manual. I realized that this was because there is a default shape for each turtle, so it did not need to be explicitly defined within the program.

Here are some screenshots of the program after I added in a shape gene.

sunflowerBiomorphs_adj

sunflowerBiomorphs_adj2

Chance Based System Gallery (plus Video Sample!) and Final Thoughts

My ideal gallery presentation:

Imagine you walk into the first room of the exhibit. There are a few benches (comfortable of course) in front a huge screen. The following videos (along with all the pieces in the exhibit) are playing on loop.

You walk through an open door to the main exhibit. Prints of the final pieces are displayed in a grid pattern (like the previous post). Pieces with the same input artist are placed adjacent to each other in a row. Rows are then stacked up on top of each other to encourage comparison.

I didn’t get to talk about it much during class, but I definitely like thinking of each sound wave as a brush stroke made by the musical artist. If you refer to the previous post, there are some distinct characteristics between the output strokes across each artist. It would be interesting to further investigate more into the properties of sound waves. And what characteristics of the music correlate to the type, color, opacity, frequency of each brush stroke.

Here is some speculation about each artist and their image output (again, you may want to refer to the previous post).

The Avett Brothers: Lots of variation in color and brush stroke throughout duration of the song.
I feel this is very indicative to the progression in the music itself. I feel like The Avett Brothers have many crescendos in their music.

Kishi Bashi: Many white strokes. With highlights of blues, teals, purples, and yellows. Extremely wavy/stringy.
Absolutely makes me think of Kishi Bashi. He plays the violin and utilizes a loop pedal. (Amazing artist if you haven’t listened to him yet).

Nujabes: Boxy strokes. Bold colors. Black accent lines.
The most interesting thing about Nujabes is the boxy strokes. I have not encountered another artist with this pattern yet.

Emiliana Torrini: Mostly vertical strokes. Lots of white, with highlights of pink and yellow.
She probably produced the most consistent outputs. The songs on her album Fisherman’s Woman do mostly consist of soft gentle beats, so I feel like these images are very suiting.

Snoop Dogg: Distinct vertical bands of color (mainly blue, green, red, and yellow). Very jagged strokes.
This is probably due to the rhythmic variation throughout the song. Also, the loops used to make the beats can come from a variety of selections.

ZZ Top: Lots of pink, purple, and red! Strokes/colors are pretty even throughout the song.
These selections of songs have a steady rhythm and tonality, which could probably explain the consistency of strokes.

I had a lot of fun working on this project. I would love to continue further exploration later down the line (potentially for my final project for generative art). =]

Chance Based System Final (as of now)

The following changes were made to my final system:
– Alpha of the stroke is based on the level of the soundwave. The louder the soundwave, the more opaque the stroke.
– Strokes are no longer drawn back and forth from top to bottom. I decided to draw the waves consistently from top to bottom. That way the repetition in sound waves is more noticeable as the line are draw parallel to each other. This increases the chance of bands forming.
– Boundary conditions are now handled as a wrap around. Before, there was an issue of a wave being stuck on the side for some time, before a wave of greater amplitude pushed it out of the corner. Now the waves are able to travel more freely.
– I was also have an issue of a line forming at the top of the image (this was more prominent in some songs more than others). This was an issue due an error in the definition of my starting point.
– The maximum amplitude of the mid and high frequency bands are now influencing the color by adding some variation.

Chance Based System, Iteration X, The Avett Brothers, "Go to Sleep"
The Avett Brothers: “Go to Sleep”
Chance Based System, Iteration X, Kishi Bashi, "Manchester"
Kishi Bashi: “Manchester”
Chance Based System, Iteration X, Nujabes, "Feather"
Nujabes: “Feather”
Chance Based System, Iteration X, Emiliana Torrini, "Heartstopper"
Emiliana Torrini: “Heartstopper”
Snoop Dogg, "Ain't No Fun"
Snoop Dogg: “Ain’t No Fun”
Chance Based System, Iteration X, ZZ Top, "Gimme All Your Lovin'"
ZZ Top: “Gimme All Your Lovin'”
Chance Based System, Iteration X, The Avett Brothers, “Paranoia in B Flat Major”
“Paranoia in B Flat Major”
Chance Based System, Iteration X, Kishi Bashi, "I am the Antichrist to You"
“I am the Antichrist to You”
Chance Based System, Iteration X, Nujabes, "Flowers"
“Flowers”
Chance Based System, Iteration X, Emiliana Torrini, "Nothing Brings Me Down"
“Nothing Brings Me Down”
Chance Based System, Iteration X, Snoop Dogg, "Gin and Juice"
“Gin and Juice”
Chance Based System, Iteration X, ZZ Top, "Legs"
“Legs”
Chance Based System, Iteration X, The Avett Brothers, "Shame"
“Shame”
Chance Based System, Iteration X, Kishi Bashi, "It All Began with a Burst"
“It All Began with a Burst”
Chance Based System, Iteration X, Nujabes, "Luv Part III"
“Luv Part III”
Chance Based System, Iteration X, Emiliana Torrini, "Sunny Road"
“Sunny Road”
Chance Based System, Iteration X, Snoop Dogg, "Who Am I"
“Who Am I”
Chance Based System, Iteration X, ZZ Top, "Shar Dressed Man"
“Sharp Dressed Man”

Struggles with Mid and High Frequency Bands

First attempts with mid and high frequency bands went poorly. I had ran through a selection of songs to gather data on maximum values for the low, mid, and high sections of bands so that I could normalize each band value from 0 to 255. However, I was getting strange results where there was hardly any variance in the stroke’s color.

Chance Based System, Iteration VII, Nujabes, "Feather"
Chance Based System, Iteration VII, Nujabes, “Feather”
Chance Based System, Iteration VII, Hospitality, "Eight Avenue"
Chance Based System, Iteration VII, Hospitality, “Eight Avenue”
Chance Based System, Iteration VII, Ella Fitzgerald, "Lullaby of Birdland"
Chance Based System, Iteration VII, Ella Fitzgerald, “Lullaby of Birdland”

After I stepped away from my program for a while, I came back to realize a simple error. For data collection, I had set to look for the max value of each band (low, mid, and high) for the duration of the entire song. However, I forgot to reset this value for each wave drawn when ready for the actual generative art process. Thus, the color stroke would change only if the current max value exceeded the previous max value. Totally makes sense how towards the end of the song, the image would flatten into one color!

Unfortunately, even after this error was fixed, I was still unhappy with the results across songs.

Chance Based System, Iteration VIII, Hospitality, "Eight Avenue"
Chance Based System, Iteration VIII, Hospitality, “Eight Avenue”
Chance Based System, Iteration VIII, Snoop Dogg, "Gin and Juice"
Chance Based System, Iteration VIII, Snoop Dogg, “Gin and Juice”
Chance Based System, Iteration VIII, Kishi Bashi, "Manchester"
Chance Based System, Iteration VIII, Kishi Bashi, “Manchester”
Chance Based System, Iteration VIII, ZZ Top, "Sharp Dressed Man"
Chance Based System, Iteration VIII, ZZ Top, “Sharp Dressed Man”

I was very unhappy with these results. Colors ended up much too dark. And there wasn’t a whole lot of variation across songs.  At this point I decided to see what kind of results I could get out of the HSV color space.

Chance Based System, Iteration IX, Hospitality, "Eight Avenue"
Chance Based System, Iteration IX, Hospitality, “Eight Avenue”

Although the colors looked very interesting together, I came across the same problem. There was not a whole lot of variation across songs. I accidentally overwrote some images, so Hospitality’s “Eight Avenue” is currently the only image output from this system. I will add another example once I finish with my update.

Ultimately, after fighting my system over a period of a few days, I realized that I was quite happy with my original color algorithm. So I went back to my old system, and decided to fine tune that for my final display.

Chance Based System Post-Critique Thoughts

So, I had my In-Progress Critique in class today for my music input chance based system. I thought I’d organize my thoughts/goals for the upcoming week.

  • Color Algorithm:
    Definitely going through with my plan to normalize the amplitudes of each frequency band, and pull my RBG channel values from the low, mid, and high frequency bands. In order to properly normalize each band, I think I will need to  find the maximum amplitude of each band across all songs I plan to use in my final piece.
  • Opacity Algorithm:
    I had been using the average amplitude of the low frequencies. Instead, I would also like to utilize the normalized bands. Perhaps using the average amplitude across the entire spectrum, or maybe a summation of amplitudes of the low, mid, and high band.
  • Behavior Pattern Investigation:
    Phil pointed out to me that thing he found most interesting about each piece is the vertical bands of color that appear. Although I feel like this is mainly due to serendipity of the pattern of consecutive beats in the song and the wavelengths having a small amplitude (thus less vertical movement), I feel this is worth further investigation. Also, it would be good to be able to reason why certain behavior appears.
  • Final Presentation:
    I really liked the idea of having a bunch of still images, as well as a video demonstrating the program as it draws in real time along to the song.
    As my main goal was to demonstrate a visual difference between different artists, it would be good to select approximately five artists of different genres. And in order to demonstrate consistency, I would use three songs from each artist.
    I’m having some difficulty choosing genres/artists, but right now I’m leaning towards indie (Kishi Bashi), hip-hop/jazz (Nujabes), rap (Snoop Dog), folk (The Avett Brothers), and rock (ZZ Top). That being said, I have a lot of favorite artists and wide taste in music, so don’t be surprised if these change. I definitely want to keep it to three songs per artist though!

All in all! I am really happy with my progress so far, and I am excited to see what comes!