Skip to content

From 0 to 1,000,000 ... Particles: Finding Joy in Building Circle Snakes

As 2024 drew to a close, I found myself buried under an avalanche of context switching—client projects, personal ventures, life admin—all piling up until I hit that familiar wall of burnout.

That's when I decided to do something different:

I chose to work on a project with zero financial upside

Those next 4-5 days brought me more joy than I'd experienced in months.

The Beauty of Building for Joy

In the tech world, we often measure success in metrics—user growth, revenue targets, deployment speed.

Every project becomes a calculated step toward some future payoff. Spending months in this rat race makes it easy to lose sight of why we started coding in the first place.

But there's a different kind of metric that we rarely talk about:

The simple joy of watching something you built come to life.

No stakeholders to please, no KPIs to hit—just you and your creation, evolving together.

It's in these moments that we rediscover the pure joy of creation.

The Project

Circle Snakes in Action (Teaser)

Overview

Circle Snakes is a generative art project that creates mesmerizing patterns through a particle system.

At its core, it's a simple concept:

  • Particles move in circular orbits at varying speeds
  • Each particle leaves a trail of "child" particles that follow its path
  • The child particles lerp between positions, creating smooth flowing lines
  • Colors shift gradually based on orbital position and velocity

The result is an ever-changing dance of interweaving curves and colors that's oddly satisfying to watch.

What started as a basic prototype with 1,000 particles at 30 FPS quickly evolved into an optimization challenge.

The initial CPU-bound implementation struggled with just 10,000 particles, dropping to 15 FPS.

Through parallel processing and GPU acceleration, the system now handles over 1,000,000 objects while maintaining a steady 60+ FPS—a 100x improvement in particle count with 4x better frame rate.

But the technical details aren't what make this project special. It's the way it captures attention and creates moments of flow—those times when you can just watch the patterns evolve and let your mind wander.

The Circle Snakes Origin Story

Circle Snakes began as a graduate school project, but its roots stretch back to my undergraduate years at Georgia Tech.

Back then, I was that CS student who could code but felt disconnected from the purpose of it all. Every day I'd trudge into the research lab, eyes fixed on the clock, counting down the minutes until I could escape.

The work felt empty. I'd rush through my lab duties just to get to classes, then rush through those just to go home.

Most of my time was spent questioning what I'd done with the last 4-5 years of my life getting this degree that I wasn't even sure I wanted to use anymore.

I actually pursued my master's degree partly as a way to delay entering the workforce—I was hoping to find that spark that would make tech feel meaningful. (It also didn't hurt that the lab I worked in paid my tuition for the degree)

That's when I discovered the Computer Graphics track and enrolled in a class called Computational Aesthetics.

The premise was beautifully simple: build things with computers that are aesthetically pleasing.

  • No business requirements
  • No scalability concerns
  • Just pure digital art.

For the first time in my life, I saw that coding could create beauty. Not just solve problems or crunch numbers, but make something that moved people, something that sparked joy.

It was a revelation—programming didn't have to be just about algorithms and efficiency.

It could be about creation, about art.

Circle Snakes emerged from a class assignment to create a skating simulation around a circle. I noticed something captivating about the lerping trail of dots following the movement, so I extended it, played with it, and watched it evolve into something mesmerizing.

Built in Processing, this simple project showed me what I'd been missing all along:

Computers could be tools for wonder, not just tools for work.

The First Version

The Evolution of a Passion Project

Over the years, Circle Snakes became my playground for exploring new technologies. Each time a new tool or framework emerged, I'd return to the project, using it as a canvas for experimentation:

Processing to Unity: Thank you ChatGPT

When large language models arrived, I used ChatGPT to help port the codebase from Processing to Unity—a transition that could have taken weeks of manual work was streamlined into a smooth refactor.

The transition to Unity also opened up possibilities for exploring this project in 3D space.

Vision Pro: A New Frontier

The Vision Pro release presented an opportunity to create a version that could be experienced in real-world space using Unity PolySpatial.

While performance challenges and Unity Pro's cost ($2,000/year) limited this exploration, it demonstrated the project's potential in mixed reality.

The Performance Improvements: o1 Pro is Magic

Christmas 2024 marked a turning point.

Using o1 Pro, I spent days dramatically improving the system's performance through several key optimizations:

  • Replaced 1M+ GameObjects with direct mesh rendering, cutting memory usage by 90%
  • Implemented compute shaders that process particle positions
  • Reduced draw calls from 10,000+ to just 100 using shared materials and instancing
  • Created custom shaders that dynamically update particle colors
  • Built a functional UI that lets you adjust parameters from 1,000 to 1M+ particles in real-time

The results were staggering: these parallel computing optimizations led to over 1000x performance improvements, creating an experience you can lose yourself in for hours.

The Final Product

Experience It Yourself

Want to lose yourself in an endless dance of particles?

Download Circle Snakes for Windows or Mac and watch as your screen transforms into a living canvas of color and motion:

The Bigger Picture

This journey with Circle Snakes has taught me something crucial:

There's profound beauty in building for building's sake.

While the tech industry often pushes us toward monetization and scale, some of our most meaningful work comes from creating things simply because they bring us joy.

As we navigate this era of rapid AI advancement, remember that these tools aren't just for building the next unicorn startup.

They're for bringing your creative visions to life, for making things that delight you, and for rediscovering the pure joy of creation.

The most valuable projects will always be the ones that remind us why we fell in love with building in the first place.


Want to share your results or get help? Drop a comment below or find me on Twitter.

I'd love to see what you come up with!