Yarntificial City
Licia He , 2026
Yarntificial City is a generative art program by Licia He, created for and presented at Responsive Dreams, a digital arts festival (Sep. 25-27, 2026, Barcelona) hosted by The Generative Art Museum. The system is a web-based program inspired by entrelac knitting and intended for digital display. An additional Python-based module examines the possibility of algorithmically designed knitting patterns.
This long-form generative artwork will be released through Art Blocks during the festival. Follow @Licia_He and @Responsive Dreams for project updates and collection details.
Yarntificial city is a generative algorithm that gives you a sneak peek into the busy lives of pixel-made knits. Living in a browser-contained city, these lovely virtual beings might look chaotic at first glance, but they will win your heart in no time.
No matter what kind of yarn you like - cotton, wool, polyester, acrylic, or even cashmere - you can find the equivalent Yarntificial in this up-and-coming neighborhood. Unlike Yarn City, this is a paradise: a much better-governed environment where you will never find any tangled threads, knitting mistakes, or unfinished WIPs. Despite occasional glitches in some neighborhoods, we assure you that all Yarntificial beings will eventually find their way back.
Breathe in the fresh RGB, explore the precise grid, and create unforgettable experiences for the whole family. Yarntificial City looks forward to your relocation!
This project page documents the Yarntificial City system and its physical counterpart, Yarn City.
Interaction notes : press [A] to toggle the block animation. Press [P] to toggle the camera movement. [D] to download the current view (PNG). [E] to export full city data (JSON). [B] to export the viewing boundary (JSON). [Mouse Scroll] and [Mouse Drag] to navigate the view.
Background
Yarntificial City exists because of a woman named Shubing Cai. She learned to knit in the years when knitting was not treated as an art form but as a necessity. Sweaters were expensive, and she needed to knit to keep her children warm. When her children grew taller, Shubing unraveled her hard work and knitted the yarn into new garments. When they grew up, Shubing knitted for her grandchildren, her friends, distant families, and almost anyone who wanted her knits. She kept knitting, day after day, stitch after stitch, until she could not hold her beloved knitting needles without shaking, until her eyes failed her.
Shubing had knitted countless stunning pieces throughout her life, but her story was not written anywhere. Even her closest family and friends could not fully grasp the extent of her mastery in knitting.
I am lucky enough to know Shubing and her stories because she was my grandmother. In my memory, she was always knitting. She taught me how to knit when I was a kid, but I never knitted anything. Not even a scarf.
After my grandmother passed away last year, I have dreams about her sometimes. In these dreams, Shubing was knitting, like she always did. It occurred to me that I don't really know her knitting journey. Despite having worn so many of Shubing's sweaters, I have no idea about her passion, her creativity, or her art.
One day, I woke up again from a dream with Shubing. I suddenly felt the urge to learn to knit. I rushed to the yarn store to buy needles, yarn, and knitting books. I had never knitted anything before, but Shubing had passed her passion for knitting to me this time. It felt natural, and I fell in love immediately.
Among the first knitting books I picked up, my favorite one is the book called Entrelac Knitting by Toshiyuki Shimada. Entrelac knitting is a technique that connects many small knitted pieces together in a designed sequence. Typically, knitting is like constructing a grid system, much like making pixel art and each pixel is a stitch. In contrast, entrelac knitting is about constructing many mini grids, some of which are rotated in different angles. These grids are pieced together into a more complex grid system.
Entrelac knitting quickly became my obsession because it appears to be both complex and simple at the same time. Grids are foundational everywhere. It is THE building block of almost everything in the modern life, as well as in my art. I cannot count how many for loops I wrote to construct grids so far. But adding a simple rotation to the grid system suddenly gives it a different life; how do elements in this grid system interact with each other, and how does an individual patch/block impact the others? I immediately felt the need to build systems to help me understand this new-to-me grid system. Besides the intriguing grid system to play with, entrelac knitting also offers the perfect bridge between algorithmic systems and physical materials. The potential to create algorithmically designed knitting pieces created a surge of excitement for me.
Part of me also thinks that my obsession with entrelac knitting is meant to be. The dream with Shubing led me to the yarn store, and Entrelac Knitting was the first knitting book to catch my eye. All the randomness, coincidences, love, grief... everything led to that moment when I decided to make a generative system for knitting. This is how Yarntificial City was born, all thanks to a woman named Shubing Cai.
Concept
Yarntificial City explores an alternative grid system inspired by the entrelac knitting technique. I imagine each generated output as a lively city for my digital yarns (yartificial beings). Every cell in the grid system is a city block, a neighborhood where many stitches exist. The yarntificial beings are the stitches, or they live in these stitches. Each neighborhood has its own vibe, but they are also closely connected to the rest of the city. Yarntificial City is a bird's-eye view of these neighborhoods, a real-time satellite map of the city.
Grid System
The grid system is constructed in the following steps:
Color
After constructing the basic grid system, each block goes through a selection process where its colors are determined. Each city has a set of starting yarn colors based on actual yarns I have access to.
I collected 4 groups of yarns that have different fiber content, color selection, and weights: 1) cotton, fingering weight, mostly highly-saturated colors, 2) wool, worsted weight, mostly muted, grayish colors. 3) acrylic, sock weight, bright base color with colorful decorative dots, and 4)assorted blend yarn (polyester, acrylic, wool, silk, and linen mix), mixed weights with a wide range of color selections.
To create more varieties, some cities use blended yarn colors as if they were knitted with marls knitting (a knitting technique where multiple strands of yarns with different colors are used together). The multi-strand mode was implemented and visualized in the system but with potential issues. While marls knitting is very charming in the physical space, visualizing every strand digitally can be too chaotic. In addition, multi-strand visualization greatly increases computational complexity, as each of the more than 100k stitches in the city would be divided into 4 or more individual sub-stitches. Because of these concerns, the multi-strand visualization is set to be an ultra-rare feature. About 1 in 500 cities would have visible multiple strands.
Stitch Patterns
Every block has at most two colors: the main color and the contrast color. Each city has a collection of stitch patterns: functions that determine whether a stitch is the contrast color. These functions range from simple column- and row-based rules (e.g., all even rows are contrast stitches) to more complex cellular automata rules (e.g., a stitch is contrast if the adjacent three stitches in the previous row are contrast). There are 206 stitch patterns in the system. Here are some examples showcasing column, circle, and cellular-automata patterns.
Animation
The animation gives Yarntificial City its playful spirit. Highly inspired by Factorio and Minecraft, the stitch animations are designed to change constantly while following an easy-to-guess pattern. There are five main categories of animations. 1) color changing, 2) swiping, 3)deformation, 4) grid surfacing, and 5) grid glitching.
The animation automatically starts when the city is built. It can be paused by pressing [A].
In addition to the movement attached to individual blocks, I added zoom and panning so the system can be navigated like a map. Use [mouse scroll/finger pinch] to zoom in and out, [mouse/finger drag] to shift the viewable area. Zoom and panning automatically start when the city is built. It can be paused by pressing [P]. The current view of the city can be downloaded as a PNG file by pressing [D].
Yarn City
Each output generated by the Yarntificial City is a knittable entrelac pattern. However, for someone to actually follow the pattern while knitting, many quality-of-life features are necessary. For instance, the knitting sequence is a crucial piece of information in entrelac knitting. Although it is possible to determine the direction manually, when the number of blocks increases and the size of each block varies, it is easy to get lost in the directions. Similarly, the stitch count and block joints are helpful additions to a knitting pattern.
The addition of these features might require significant computational power for a browser-based system, given that there could be a large number of blocks in the city and that the entire system needs to be rendered and animated on a mobile device. Because of that, I decided to separate the pattern-building features into an additional module. Implemented in Python, this module takes the output of Yarntificial City and processes the city plan into knittable entrelac patterns. I refer to the physically knitted outputs of this system as Yarn City.
The pattern module needs two groups of information. To reconstruct the city map, it needs data of the entire city: the size, location, and color of each stitch. In addition, the pattern generator needs a boundary box to define the knitted piece's boundary. The full city normally contains more than 100k stitches. Knitters would likely want to knit a section of the city instead of the whole city. As a result, the pattern module uses the currently visible view as the boundary box. Users can use the zoom and panning feature to navigate to the blocks they want to knit. When [E] is pressed, the entire data needed for the pattern generation is exported as a JSON file.
The pattern module reconstructs the city into a more readable format. It currently produces 4 groups of information: 1) visualization of the knitting area. 2) the full knitting chart, with knitting sequence and block information. 3) a spread-out knitting chart showing the connections between blocks. 4) Knitting charts for individual blocks with the color information.
At the moment, the pattern-generating module is in closed beta and might become publicly available in the future. If you are interested in knitting a Yarn City, you can consider one of these free, pre-generated patterns or reach out to me for more information.
Development Process
Yarntificial City is implemented in JavaScript without any dependencies to external libraries. It is licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Licence (CC BY-NC-ND)
Here is a narrated journey of my development process for this project.
Ending
To Shubing Cai
When I was building the Yarntificial City and knitting its output, I tried to imagine how Shubing would react to it. Maybe she would love to turn it into a garment. Maybe she would be shocked by the number of thread changes in the pattern. Maybe she would like to see floral and animal motifs in the blocks. Maybe she would be intrigued by the idea that the yarns she played with for her whole life now seem to have their own digital lives behind a screen.
It saddens me that I will never know her reactions. But I think she would at least be happy to know that we finally get another knitter in the family, that someone finally understands why knitting is amazing and addictive. And this thought makes me happy. Grandma, this one is for you.
Acknowledgement
I want to thank The Generative Art Museum for creating such a wonderful festival for code-based generative art. Responsive Dreams is a dream event for me to be a part of. It is a pleasure to work with Xavier again, after our first collaboration in 2023 ( Input Output, online exhibition). Thanks for bring this event into reality.
I also want to thank the Art Blocks team for supporting us through the project releasing process.
And as always, thanks, my dear sister, for everything.
Licia, 2026