Lines of force

To explore the possibilities of using permanent magnets together in different configurations, I’ve been spending the last few days writing various simulators. It turns out that HTML4 Canvas and JavaScript are great for this.

The below simulation is just built from basic magnetic dipole math. Once I had that in place, I simulated six little magnets in a hexagon pointing inward toward a stronger magnet pointing downward.

The field lines this creates are surprisingly beautiful, as you can see for yourself. Click on the image below to see an interactively viewable version:


 

Try to view it in Firefox or Chrome if you can, since Safari doesn’t properly show the delicacy of the lines.

2 thoughts on “Lines of force”

Leave a Reply

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