Modelling a double pendulum with ChatGPT and Google Colab




At last night’s STANSW Science Extension Network Meeting, a member asked a question about whether there were simulators of double pendulum systems, as a student was interested in modelling chaotic systems. We’d also been chatting about using Python and chatGPT.

So to demonstrate, we jumped onto “chatty” and within a few minutes, had created a Python simulation that generated videos like this one

We saved the chat so you can see just how easy it is

The code for the simulator is saved to github at the link below. You can open it in Google Colab using the button and then click File –> Save to Drive.