The Levitron is a magnetized top that levitates above a magnetic base. The first device I saw around 1995 had a wooden base, the one I have now has a plastic base with a stronger magnet inside (called Super Levitron). It levitates at a higher level, but is less stable. This is what it looks like:

You have to spin the top on a supporting plastic plate and than lift it with the plastic plate. In order to achieve stable conditions, the weight needs to be adjusted carefully.

www.levitron.com/physics.html gives some basic explanations concerning the physics of the Levitron.

The best description of the dynamics of the Levitron I know is the paper "Dynamics of the Levitron" by Roger F Gans et al (J. Phys. D: Appl. Phys. 31 1998 671-679). They derive a twelfth order Hamiltonian system and show numerical simulation results.

My goal was to combine the mathematical model with a graphical interface to create a virtual Levitron with instant visual feedback. This gives me a much better feeling for the dynamics of the system than printed curves.

The first task was to derive the actual differential equations from the Hamiltonian system. I found this non trivial. When I searched the Web for further information I found a german paper "Die Numerik des Kreisels" by Thilo Maier (April 2000 - it seems to have dissapeared from the Web) that showed how to use Maple to derive the differential equations for a normal non-levitating top. I liked that approach and wrote a Maple script for the dynamics of the Levitron.

This Maple script dyn_of_lev.mws creates the differential equations in C notation. If you don't have access to Maple: dyn_of_lev.pdf shows the maple session in pdf format.

I decided to write a Java applet for the online simulation (my first Java program). I wrote some basic graphics routines to draw a perspective view of the top. I added a thread running the simulation. I found out that the integration of the differential equations was unstable for a simple euler integration. With a second order Runge-Kutta method (Numerical Recipies in C, William H. Press et al, Cambridge University Press 1988) and a propper step size the simulation is stable. Since Java has inherited much of C, the differential equations exported as C can easily be used in Java as well.

Now you can see the applet in action. Start the applet, then carefully lift the top with the left most slider. At some point, it will float off the plastic plate. This indicates that the weight is too high. You have to move the plastic plate back to the initial position (left slider on center position) and then restart the applet by moving the last slider all the way down and then back to the center. Now decrease the weight a little bit with the second slider. The optimum weigth is around the center position of the second slider. Then try to lift the top a little with the left slider and move the plastic plate down again. The top should levitate now.

The sliders have the following functions:

- Height of the plastic plate
- Weight of the top
- Speed (rpm) of the top
- Horizontal viewing angle
- Vertical viewing angle
- Speed of the Simulation

Feel free to improve this applet. The source code maglev.java uses deprecated API functions, since I wrote the first functions in 1999. You can still compile them (at least on my linux system) with

javac -deprecation maglev.java

Update: Now you can restart the simulation by moving the last slider down to zero and up to the center again. At this point, the rotational speed of the top will be set according to the position of the third slider (this slider has no effect while the simulation is running).

© 2005, 2010 Hans-Georg Köpken