The concept
As the titles indicates, this sketch is about being creatively bankrupt. Why creatively bankrupt, might you ask? This mental state involves a constant black and white noise (as those seen in TV when there is no signal). It is a state in which no ideas flow, where ideas are not as good as you thought. Frustrating to say the least. Nevertheless, creative bankruptcy itself can be expressed as art.
With this concept in mind, I wanted to do something similar with cellular automata. Therefore, I present you my newest sketch: “Creative Bankruptcy”
Controls: Mouse Click: Start music. Moving mouse while pressed: Rotate through the X, Y and Z axis. Z key: Start from the beginning with a new rule value (new pattern). X key: Stop generating scan lines C key: Clear background.
Full-screen version: Creative Bankruptcy
Brief explanation of the code
The code work in the following manner:
1. Since we are working with cellular automata, a system needs to be in place in order to work. The vision I was seeking for required for me to create an array that hosts multiple classes for every cellular automata. So, the idea is to store multiple classes inside the array and then use the custom function of prepare()
with each one of them.
//Prepare celular spawners. //Parameters for spawning a celular spawner: (ruleValue, w, y, direction). cells.push(new CelularSpawner(int(random(255)), 5, 0, 0)); cells.push(new CelularSpawner(int(random(255)), 5, 0, 0)); cells.push(new CelularSpawner(int(random(255)), 5, 0, 0)); cells.push(new CelularSpawner(int(random(255)), 5, 0, 0)); //Prepare the celular automata spawners. for (let i = 0; i < cells.length; i++) { cells[i].prepare(); }
The function prepare()
prepares the cellular automata spawner by analyzing the total width of the canvas and then filling each cell by the establish width in the parameters to properly fill it out and follow the pattern with calculateState(a, b, c)
:
prepare() { this.ruleSet = this.ruleValue.toString(2).padStart(8, "0"); let total = width / this.w; for (let i = 0; i < total; i++) { this.cells[i] = 0; } this.cells[floor(total / 2)] = 1; }
calculateState(a, b, c) { let ruleset_length = this.ruleSet.length; let neighborhood = "" + a + b + c; let value = ruleset_length - 1 - parseInt(neighborhood, 2); return parseInt(this.ruleSet[value]); }
2. For reasons I will explain later, I decided to use WEBGL to generate a different effect on the canvas. This is due to the fact that, since the canvas was seeking to transmit a feeling of watching it on CRT, the shader support was limited to only WEBGL. Despite shaders not being used for this sketch, the rotation of it to generate different patterns was left with the function orbitControl(1,1,1)
.
3. Being inspired by “Following Uncertainty”, I decided to implement, again, audio spectrum visualizer. Although, this one is represented through an image that increases its sizes accordingly through a plane.
The creative bankruptcy behind it (A self reflection and what I could be proud of)
This section is more of a self-reflection on why this assignment was so hard for me, despite my other sketches being more complex. It seems that, at the end of the semester, the burnout catches up. It is frustrating since I had many ideas that I wanted to explore in this sketch:
-
-
- Boxes with physics done by matter.js that each location is generated by the patterns of cellular automata.
- A CRT like canvas done with the use of shaders.
- An image being filled by the patterns generated by cellular automata.
- An album like done with four sections divided in the screen that are filled by cellular automata.
-
All of these ideas (kind of) eventually arrived into one. Despite having artistic qualities, it is still not as creative as I wanted it to be. It is frustrating to not being able to implement new ideas due to the aforementioned creative bankruptcy. But as everything in life, we will not get the results we want in one try, and in my case, I should have tried more in other to get a more proper system going on.
For the final project, I will revise all of my previous ideas into something interesting. All of this knowledge I have accumulated into the class will not go unused.
Used sources:
1. Aesela. “𝒀𝒗𝒆𝒔 𝑻𝒖𝒎𝒐𝒓 • 𝑳𝒊𝒎𝒆𝒓𝒆𝒏𝒄𝒆 • 𝑨𝒏𝒈𝒆𝒍𝒊𝒄 𝑽𝒆𝒓𝒔𝒊𝒐𝒏.” YouTube, 24 Apr. 2022, www.youtube.com/watch?v=FfQoshkVChk. Accessed 22 Nov. 2024.
2. “Animated GIFs by Kjhollen -P5.Js Web Editor.” P5js.org, 2024, editor.p5js.org/kjhollen/sketches/S1bVzeF8Z. Accessed 22 Nov. 2024.
3. “CreateImage.” P5js.org, 2024, p5js.org/reference/p5/createImage/. Accessed 22 Nov. 2024.
4. “ShaderToy CRT by Keithohara -P5.Js Web Editor.” P5js.org, 2024, editor.p5js.org/keithohara/sketches/xGU1a8ty-. Accessed 22 Nov. 2024.
5. Tenor.com, 2024, media.tenor.com/88dnH_mHRLAAAAAM/static-tv-static.gif. Accessed 22 Nov. 2024.
6. The Coding Train. “Coding Challenge 179: Elementary Cellular Automata.” YouTube, 9 Jan. 2024, www.youtube.com/watch?v=Ggxt06qSAe4.