States of Matter: Generative Art on the ESP32

For Module 1, I created a generative art piece called States of Matter, built on a LILYGO T-Display. The theme for our class installation was “Transitions,” so I wanted to create something where transition was not just an animation between two images, but the main idea driving the piece.

Artistic Vision

I decided to visualize the transition between the three familiar states of matter: solid, liquid, and gas.

The same group of particles continuously changes its behavior depending on its current state. In the solid state, the particles arrange themselves into a rigid grid and only vibrate slightly. As the material “melts,” that structure begins to loosen, and the particles fall and flow around one another like a liquid. Eventually, they gain more energy and disperse throughout the entire screen as a gas. From there, they are gradually pulled back into an ordered structure, beginning the cycle again.

I liked this idea because a state of matter is defined less by what its particles are than by how they relate to and move around one another. The individual particles remain the same throughout the piece, while their behavior continually changes.

The colors transition along with the movement. I used cooler colors for more structured states and warmer colors as the particles become increasingly energetic:

cyan → magenta → orange

Rather than making three separate animations, I wanted all of these properties—position, movement, organization, and color—to continuously blend into one another.

Design Decisions

One of my most important decisions was to make the transitions gradual instead of instantaneous. The particles do not suddenly switch from behaving like a solid to behaving like a liquid. Instead, the forces controlling them slowly change.

For example, while the particles are solid, each one is effectively attached to a predetermined position by an invisible spring. During melting, that attraction gradually weakens while gravity, random movement, and particle-to-particle interactions become stronger. During the transition from liquid to gas, the particles gain more velocity and eventually begin moving freely throughout the screen.

I also incorporated randomness into the particle movement. Although the piece follows the general cycle of solid → liquid → gas → solid, the particles never follow exactly the same paths twice. This was important to me because the assignment asked us to create generative art rather than the equivalent of a looping GIF.

Extending the Screen onto the Envelope

I wanted the physical installation to continue the same idea as the digital piece.

On one side of my envelope, I drew particles as a tightly organized geometric grid. Moving toward the center, those rigid shapes gradually turn into waves, curves, and droplets representing liquid. On the opposite side, the shapes break apart into increasingly scattered dots representing gas.

installation.jpg

This made the ESP32 screen feel like part of a larger composition rather than simply a device placed inside an envelope.

Technical Challenges

One of the biggest challenges actually happened before I could work on the artwork itself: getting my Mac, Arduino IDE, and T-Display communicating correctly.