Making Waves (& Flocking Birds): Creating Science Simulations with AI

by | Tuesday, June 24, 2025

I’ve been experimenting with AI-assisted coding for a while now—in fact my first attempt was back in early 2023. Since then I have engaged in multiple explorations using AI to transform concepts and intuitions directly into functional code. This approach bypasses conventional programming workflows (which incidentally I know NOTHING about), letting me focus on the creative vision while AI handles the technical implementation.

Some of my examples include a unit-circle simulation: version 1 and version II. This simulation weaves together Pythagorean theorem, trigonometric functions, sound, and color (and if I say so version II is significantly better). More recently, I have created simulations of bacterial interactions with antibiotics and two different visualizations of gas laws that bring abstract thermodynamic principles to life (Version I & Version II). I have also created incorrect simulations—namely simulations that get the science wrong, BUT (and this is important) can be powerful pedagogical tools. And then there are the creative fun ones, like this one on understanding Indian Tabla rhythms.

Clearly, I have been doing this for a while. But I know that these tools are getting better—at least so I have heard. So it was time to revisit vibe coding. So, this morning I decided to spend some time, in between meetings, to experiment some more. Long story short, the tools have become significantly better and more powerful. The process was smoother, though it is not clear how much of that is because I have become better at working with AI or because the AI has improved. What IS clear is that the final products, this time around, were far better than the one’s I had created before—in substance and in style.

The process was remarkably straightforward. I had Claude brainstorm possible simluations to create, and then asked it to craft a prompt to generate the code, and then entered the prompt to make it do the work of generating the code. The process was seamless and, honestly, quite amazing. We ended up with three pretty cool and scientifically accurate simulations. There is no way I could have created anything like this from scratch.

Just in case it isn’t clear, I wrote no code. None whatsoever!

Wave Interference (opens in a new tab) demonstrates how two simple wave sources create complex interference patterns. Users can interactively adjust frequency, amplitude, and source positions to see how waves add constructively (bright regions) and destructively (dark regions). The visual is immediately captivating—beautiful rippling patterns that look sophisticated but emerge from basic sine wave mathematics.

Flocking Birds (opens in a new tab) showcases emergent behavior through three simple rules: separation (avoid crowding), alignment (match neighbors’ direction), and cohesion (move toward group center). What appears to be intelligent coordination is actually individual agents following basic local rules, creating complex flocking patterns without any central controller.

And finally the best of the lot, Sound Wave Interference tackles one of the most persistent misconceptions in physics education: how sound actually travels. This simulation offers three viewing modes—pressure waves (blue gradient), air molecules (brown dots oscillating around home positions), and both views combined. Students can toggle between modes to see the crucial connection: molecules vibrate in place while pressure patterns travel through space. The ability to turn sources on/off and lock frequencies makes standing wave creation effortless, while the proper vector-based molecular oscillation shows how sound waves actually propagate radially from sources.


Creating these simulations provided me two key insights.

First, these simulations can effectively challenge several persistent student misconceptions about the domain in question: wave motion or the flocking behavior of birds. For instance, students often think waves “disappear” during destructive interference; the wave simulation shows they continue past interference points. As it happens this is how some noise-cancelling headphones work. The sound simulation addresses perhaps the most fundamental misunderstanding in wave physics: the difference between energy transfer and matter transfer—namely energy moves, matter pretty much wiggles around but stays, pretty much, at the same spot. Students can literally watch molecules staying in their neighborhoods while pressure waves flow through them, making the abstract concept of wave propagation concrete. Finally, the flocking simulation reveals how sophisticated group dynamics emerge from simple individual rules. The magic of murmuration can be understood, not by some overarching framework, but rather as being emergent from 3 simple rules that guide the actions of individual birds (not the collective).

Second, and perhaps most importantly, all three simulations counter the misconception that AI and computational systems must be incredibly complex to produce impressive results. GenAI does give educators superpowers – and these simulations are examples of what can be generated through the thoughtful use of these powers.

And I will leave you with one question: Why stop at teachers? What prevents us from asking students to create simulations such as these? And how does that change how and what we teach? And most importantly, how we assess learning.

A few randomly selected blog posts…

Heading to India

I leave for India tomorrow to participate in a Symposium on Education Technology in Schools: Converging for Innovation & Creativity being held in Bangalore from the 20th to the 22nd of August. The meeting is organized by the Quest Alliance, USAID and International...

TPACK & More: Presentation at RemoteK12 summit

TPACK & More: Presentation at RemoteK12 summit

REMOTE K12: The Connected Teacher Summit, was a one-day virtual summit hosted by ASU, designed for K-12 teachers and those that support and enable teachers in district public, charter and private schools.  I presented a talk titled: Technology in teaching &...

Is TPACK fundamentally flawed? A quick response

Richard Olsen over in his blog has an extended posting titled The TPACK Framework is fundamentally flawed. It is a long and thoughtful post and I recommend everyone to read it. I have posted a short response to his posting (it is under moderation but should show up in...

Sketching on the iPad

Over the past few weeks I have been experimenting with using my iPad as a drawing/painting tool. The sketches below were created by tracing on an existing image - usually a photograph. So this is not "freehand" drawing per se - but given my limited talents that may...

Students video premiere on aftered.tv

This just in. Leigh Wolf just informed me that a video created by three of her students this past summer accepted by AfterEd - a web-based video channel produced by EdLab at Teachers College, Columbia University. New content is published weekly, including news,...

The Desk, the Test, the LMS: The 5 Spaces for (re)Design in Education

The Desk, the Test, the LMS: The 5 Spaces for (re)Design in Education

What do a teacher's desk, the PISA test and Learning Management Systems (LMS) have in common. Apart from being educational technologies, they are also the heart of a book chapter that Melissa Warr, Kevin Close and I just published in a book titled Formative Design in...

Blurred visions: Another history of TPACK

Blurred visions: Another history of TPACK

I had posted recently a video based on a talk I had given at ASU. In that video I spoke about the role of theory in research through a history of the TPACK framework. You can see the video here. Now, my TPACK partner in crime, Matt Koehler, has created his own...

A different vision of the web

T. H. Nelson coined the word "hypertext" and more than anyone else, and much earlier than anyone else, truly understood how computing technology would change the text and print. One of my most treasured possession is a copy of his double-book ("Computer Lib: You Can...

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *