๐Ÿš€ Inspiration

The inspiration for Wave-Particle Duality Simulator came from one of the most fascinating and counterintuitive experiments in physicsโ€”the double-slit experiment.

We were intrigued by a simple yet profound question: How can something behave as both a particle and a wave?

While textbooks explain this concept mathematically, it often lacks intuitive understanding. We wanted to bridge that gap by creating a visual, interactive simulation where users can see quantum behavior emerge in real time and even manipulate it.


โš™๏ธ What it does

This project is an interactive simulation that demonstrates wave-particle duality using the double-slit experiment.

It allows users to:

  • Switch between photon mode (light waves) and electron mode (matter waves)
  • Observe how individual particles gradually form an interference pattern
  • Toggle the observer effect, which collapses the interference pattern
  • Experiment with parameters like wavelength, slit width, and separation
  • Visualize multi-wavelength interference using color

At its core, the simulation models intensity using:

$$ I = I_0 \cdot \text{sinc}^2(\beta) \cdot \left(\frac{\sin(N\alpha)}{\sin(\alpha)}\right)^2 $$

And in electron mode, it applies the de Broglie relation:

$$ \lambda = \frac{h}{p} $$


๐Ÿ› ๏ธ How we built it

We built the project using:

  • Python + Pygame โ†’ for real-time rendering and UI
  • NumPy โ†’ for high-performance vectorized physics computations

Key components include:

  • A physics engine that computes interference patterns
  • A probabilistic sampling system using CDF-based particle generation
  • A wave simulation module that visualizes amplitude and intensity fields
  • A state-driven UI system for switching modes and controls

Instead of plotting static graphs, we simulate thousands of particles per frame, allowing patterns to emerge naturally from probability distributions.


โš ๏ธ Challenges we ran into

  • Numerical stability: Handling edge cases like ( \sin(x)/x ) near zero without division errors
  • Performance optimization: Rendering thousands of particles per frame without lag
  • Balancing realism vs usability: Keeping physics accurate while making controls intuitive
  • Visual clarity: Designing a UI that explains complex quantum behavior without overwhelming users
  • Scaling electron physics: Adapting ( \lambda = h/p ) into a visually meaningful simulation

๐Ÿ† Accomplishments that we're proud of

  • Successfully simulating quantum interference using particle sampling, not just equations
  • Creating a system where random particle hits form structured patterns over time
  • Implementing the observer effect, showing wavefunction collapse interactively
  • Combining physics, computation, and design into a single cohesive experience
  • Turning a complex concept into something users can experiment with and understand

๐Ÿง  What we learned

  • How probability distributions drive real-world quantum phenomena
  • The power of NumPy vectorization for real-time simulations
  • How to translate abstract physics into interactive visual systems
  • The importance of UX in scientific tools
  • That learning becomes far more effective when users can explore instead of just observe

๐Ÿ”ฎ What's next for Wave-Particle Duality Simulator

We see this project evolving into a full educational and research tool:

  • ๐ŸŒ Web version (React + WebGL) for global accessibility
  • ๐Ÿค– AI-powered explanations to guide users in real time
  • ๐Ÿงช More experiments:

    • Quantum tunneling
    • Schrรถdinger wave evolution
    • Entanglement visualization
  • ๐ŸŽฎ Enhanced challenge mode for gamified learning

  • ๐Ÿ“Š Real-time analytics and graphing tools

  • ๐Ÿง‘โ€๐Ÿซ Integration into classroom and e-learning platforms

Built With

Share this project:

Updates