Concept + references
This piece was inspired by the landscapes that are usually used for some songs when a person wants to look at the lyrics, and I thought it would be a nice idea to explore with the generative text output. Although the parameters and functions used are very similar to the ones we learned in class, I tried to make changes to the structure of the text, as well as its position in the canvas, the background, and the color of the text. Overall, the generative text output resulted from a combination of words which I found most “romantic” and appealing, while also integrating a sense of “discomfort” laced within the text.
Highlight code
As previously mentioned, most of the codes are drawn from the ones learned in class. Despite this, my favorite code I incorporated into this project was the use of random text color and the gradient color background. These codes allowed me to 1) set a random change of color of text that adjusts to the random changes of the words for each sentence, and 2) create a gradient color background to resemble a sunset.
// This function is to make the background colors gradient let c1, c2; function setup() { createCanvas(400,400); c1 = color(240, 0, 110); // Red c2 = color(240, 120, 0); // yellow // setting the function so that the colors are displayed // Number of lines (2) print('The number of lines:' + strings.length); print(strings); } function draw() { background(255); // mapping the text from excel to the canvas for (let y = 0; y < height; y++) { let n = map(y, 0, height, 0, 1); // Scale y to a 0-1 range let newColor = lerpColor(c1, c2, n); // Interpolate between colors stroke(newColor); line(0, y, width, y); // Draw a horizontal line } // random function for text color // these are random RGB values let r = random(255); let g = random(255); let b = random(255);
Embedded sketch
Reflection and ideas for future work or improvements
While this project was able to fill the basic requirements for a generative text output, I wish I could have been more creative and explore a different and more interactive way of displaying the text. For future works, I will try to research in advance how to implement interactivity while also taking in consideration the time needed and if the techniques I found are accessible to my level of experience. Nevertheless, I do appreciate the visual aspect of the work, and believe it adjusts to my initial vision of how I wanted the outcome to be.