Generative Patterns

This study investigates the intersection of sentiment analysis and generative art, employing computational methods to transform textual inputs into dynamic visual patterns reminiscent of fabric textures. Using the AFINN sentiment analysis tool, numerical scores are extracted from text based on emotional tone and word count, and these scores are mapped to design parameters such as rectangle size, position, and texture.

The resulting visuals consist of overlapping layers that respond simultaneously to sentiment polarity and textual length, creating a carefully balanced interplay of structure and randomness. Rectangles are scaled to reflect emotional valence, while word count introduces additional variability, influencing placement and size in less predictable ways. These layered compositions are further refined using dithering techniques, including Floyd-Steinberg and Atkinson, producing intricate halftone textures that evoke the tactile quality of woven or stitched fabric.



The project began by integrating sentiment analysis to drive the design of patterns. Two key variables were extracted from the analyzed text:
  • Sentiment Analysis Score: Determined the pattern for one part of the piece.
  • Word Count: Controlled the design of the second part, ensuring variability across outcomes.

Initially, the code used two static images as base patterns. The dither intensity of these images was manipulated to introduce variability. However, this approach was limited, as the patterns lacked sufficient diversity due to reliance on the same underlying images. To address this limitation, the static images were replaced with dynamically generated shapes—specifically rectangles—that responded directly to the extracted sentiment scores and word counts.









I am very happy and excited about these results
I am angry and sad and upset
sad