Browse By

Algorithms of Art

Written by: Jack Morby

The first few things that come to mind when thinking about art are physical products like paintings and drawings. These have been the traditional mediums that have been used to share art, but art is not limited to them. New paths are always being explored. A computer is a great way to view and access art, but it also has a deep connection with the creation of art. Since technology has advanced so much over the past century, the medium by which artists complete their art has also been able to advance. Digital media software like Photoshop or Illustrator can be used to create art similar to real life art, but art can stem from even stronger computational operations. Math is used to describe the nature of the universe with algorithms being an extension of math. Algorithms provide an avenue to generate art not from the minds of people, but from the nature of the universe.

Figure 1

Algorithmic art created from fractals is entitled “Dr. Seuss”. Designed by artist Linda Allison

Source: https://www.ibm.com/ibm/history/ibm100/us/en/icons/fractal/impacts/

 

Online Influence

Some examples of modern technologies used for relaxation through art are popular entertainment platforms, such as Youtube and Netflix and also through social media platforms like Instagram and SnapChat. A healthy amount of social media use is shown to increase Positive Mental Health levels, a scale developed to measure psychological well-being (Bekalu). Art is more intrinsically linked to computer science than ever. The recent popularized digital works of art bought and sold with cryptocurrency, NFT’s, reinforces that connection. Despite this, none of this art can be considered algorithmic art, which requires an artist to use algorithms in the creation process. Some of the most interesting examples of modern computer-based pieces of art are published on the video platform Youtube. A Youtube video called “15 Sorting Algorithms in 6 Minutes” has accrued over 16 million views since when it was published in May 20th, 2013, simply by adding sound to multiple computational techniques. The reason for this specific video’s popularity is a mystery to many. It is irrational, loud, and confusing to the first-time watcher. To some degree, the only way to understand the concept is to watch the video if you have not already. The visuals and audio are incredibly unique, sometimes sounding like an object from outer space or white noise from a television. When watching the video, it induces engagement, as evidenced by the views and the many comments that can be seen published underneath the video. The process introduced in the video is not a breakthrough or scientific revelation, but rather a piece of art that can be used for relaxation, entertainment, or even as a form of education.

Figure 2

Reference image of Sorting Algorithms in 6 Minutes

Source: https://www.youtube.com/watch?v=kPRA0W1kECg&feature=youtu.be

 

The Algorithms

The process being completed in the video, the sorting of bars of different length, is a common programming task used in undergraduate computer science courses. The first algorithm of the video is the “Selection sort,” which is a straightforward method to organize the bars. The red color that flashes across the screen represents the program interacting with those bars. The Selection sort runs linearly through the remaining unsorted bars looking for the next bar in the sequence it has already organized. When it finds the bar, it places it in the correct position, and repeats this until it finishes. Two of the most visually appealing sorts for viewers are the “Bubble sort” and “Cocktail shaker sort” because of the interesting effects they create. In the Bubble sort, the code checks each bar in relation to the bar that is to its side. If these two bars are organized correctly, as in the one on the left is smaller than the one on the right, than the program does nothing. If they are organized incorrectly, the programs flips them. In this way, the Bubble sort runs through all of the bars repeatedly until the order is correct. This gives the effect of bubbles sinking to the bottom near the end, hence the sort’s name. For the Cocktail Shaker sort, it uses the same general idea as the Bubble sort, comparing adjacent bars over and over again. Instead of running through the code left to right every time like the Bubble sort, it alternates its direction after every pass. The red bar quickly goes back and forth like a cocktail shaker, hence the sort’s name. The worst sort, in terms of its efficacy, is the final one in the video called the “Bogo” sort. It randomly switches bars until the sequence is correct, generating a constant pulsing with varying tone. This is a flawed method because it almost always takes an extremely long time to achieve the same result as other, much quicker, methods like the ones mentioned before. Each one of the sorts explained here and all of the others in the video have their own interesting processes to deal with the task assigned. When presented in a visual and auditory format it becomes even easier to learn how each one of them works.

 

Conclusion

Computers are becoming increasingly important in running the world, and their purpose extends further than high-speed banking or NFT storage. There is also the ability for it to be used to make art. Watching a computer do work for a few seconds that would take a human many times longer stimulates our brains, causing us to feel accomplished and happy. Understanding how each algorithm works can bring another level of enjoyment to the video. Like everything, use of technology and algorithmic art should not be overused, watching the sorting video more than once a day might be considered an addiction more than a good practice.

 

 

 

References and Sources

Bekalu, Mesfin A., et al. “Association of Social Media Use With Social Well-Being, Positive Mental Health, and Self-Rated Health: Disentangling Routine Use From Emotional Connection to Use.” Health Education & Behavior, vol. 46, no. 2_suppl, Dec. 2019, pp. 69S-80S, doi:10.1177/1090198119863768.

Gill, Sandeep Kaur et al. “A Comparative Study of Various Sorting Algorithms.” Computation Theory eJournal (2018): n. pag.

Leave a Reply

Your email address will not be published. Required fields are marked *