Inspiration

I’ve always been fascinated by how everything in the universe comes down to a few basic particles - protons, neutrons, and electrons. I wanted to make something where you don’t just read about atoms, but actually build them and see them come alive. That’s how Atomica started - as an idea to turn chemistry and physics into something you can interact with and understand visually.

What it does

Atomica is an interactive atom simulator that lets you build elements from scratch using protons, neutrons, and electrons. On the left side, there’s a 2D workspace where you place the particles - and on the right, a 3D ray-marched visualization instantly brings your atom to life, showing orbiting electrons and a glowing nucleus. As you build, Atomica automatically identifies the element, shows its basic properties like atomic number and mass, and displays a short description. You can also chat with Gemini AI, which understands the element you’ve created and can answer questions about it - from its chemical behavior to how it’s used in the real world. It’s a mix of science, visualization, and AI, designed to make learning about atoms feel like actually creating them.

How I built it

Atomica is made with C++, OpenGL, and ImGui. On the left side, there’s a 2D constructor where you can place protons, neutrons, and electrons to form an atom. On the right, a ray-marched 3D shader visualizes your atom in real time - showing nucleus clustering and orbiting electrons. Every time you add a particle, Atomica automatically calculates the atomic number, mass, and recognizes the element you’ve built. I also integrated Gemini AI, which receives live context about the current element and can answer any question related to it - from chemical properties to real-world uses.

Challenges I ran into

The hardest part was synchronizing the 2D editor with the 3D visualization - every small change in particle count needed to reflect instantly in the shader. Another big challenge was making the ray-marching shader look smooth and dynamic while keeping performance stable. And finally, getting Gemini to understand the context correctly - so that when you ask “What is this element used for?”, it answers based on the atom you actually built - took some trial and error.

Accomplishments that I'm proud of

  • I built a real-time 3D ray-marched atom visualizer completely from scratch - all the rendering, lighting, and motion are done with custom shader code.
  • I managed to synchronize the 2D constructor with the 3D view, so every proton or electron placed instantly updates the visualization.
  • Integrated Gemini AI in a way that gives it real context awareness, allowing users to have meaningful conversations about the atom they’ve just built.
  • Designed the entire UI using ImGui, keeping it clean, interactive, and smooth to use - even with complex shaders running.
  • Learned to combine physics equations, math, and AI models into one cohesive experience.

What I learned

This project taught me how much math and physics hide behind what seems like a simple atom. I worked with vector math, rotations, and orbit equations to simulate realistic motion in the shader. I also learned how to connect AI models to a live simulation and pass contextual data between them, which made the whole experience feel alive.

What's next for Atomica

Atomica is more than just a simulator - it’s a way to explore how matter is formed, piece by piece. You don’t just learn about atoms - you create them, see them spin, and talk to them. I would like to contribute Atomica to open-source so people can enjoy, learn from that and contribute freely.

Digital Inspiration

link

Built With

Share this project:

Updates