Emily Charles
  • Home
  • Work
  • About
  • Resume/CV
  • Contact

Pendulum Visualizer

About the app

This visualizer is meant to imitate the physics experiment shown here, in which pendulums on strings of varying length are set into motion simultaneously. I found the resulting visual beats to be mesmerizing, so I wrote a highly tweak-able version in code. 

The visualizer starts off approximating the real world fairly accurately (if you accept the small-angle approximation for the sine function) and expands into areas of pure mathematics. All of the modes are visually interesting, and patterns pop up everywhere. 


About the code

The pendulum visualizer is written in Python, and currently runs on an in-browser platform called Codeskulptor. It uses a custom library called simplegui to render the graphics.  

I wrote this as a student in a Coursera course called Introduction to Interactive Programming in Python I'm in the middle of porting this code to run as a standalone desktop app, with rewrites to make it much cleaner. 

Available versions

In-browser

The browser version cannot be downloaded directly, but rather is hosted by Coursera. To start the visualizer, follow the link below and click the "Play" button at the top left of the page.

I encourage you to play with the interactive options on the left sidebar. There are some interesting effects to be had. Patterns will always appear if you watch long enough. 

Notes:
  • Some browsers do not play well with Codeskulptor. Firefox seems to be the most stable, followed by Chrome. It will not work with Internet Explorer.
  • This version of the code has not been maintained. The Codeskulptor platform has changed, but I have not created new versions to compensate. There are bugs in the code that did not exist when I first wrote it.
  • I wrote this version as a student. Please do not take it as an indication of my current skill!
Pendulum Visualizer
Desktop


The desktop version is under construction. I will upload it here when it's presentable.


Screenshots

Creative Commons License
Pendulum Visualizer by Emily Wachtel Charles is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at http://www.codeskulptor.org/#user12_1JVbGCWzEwylxdY.py.
Proudly powered by Weebly