🧲 Magnet Power!

🖱️ Move your mouse to control the magnet!

About this simulation

This playful canvas toy lets you sweep a bar magnet across the screen and watch dozens of paperclips spring towards it. Each clip is a small particle that feels an attractive magnetic force whenever it sits within a 200-pixel range of the magnet, while gravity, a friction-like drag and bouncing walls govern everything else. The pull grows stronger as a clip gets closer, so nearby clips snap on and ride along, illustrating in a simple, intuitive way how a magnetic field reaches out and grabs ferromagnetic objects.

🔬 What it shows

A bar magnet (red north pole, blue south pole) attracts paperclip particles. Each frame the model finds the distance to the magnet and, inside the 200px range, adds a velocity toward it sized as strength divided by distance, so the force rises sharply up close. Clips within the magnet radius latch on; others fall under gravity, lose speed to drag and bounce off the screen edges.

🎮 How to use

Move your mouse (or finger on touch screens) to drag the magnet around the canvas. The "Strength" slider (5-20) sets how powerfully the magnet pulls. The "Clips" slider (10-100, in steps of 10) sets how many paperclips appear. The "Reset" button scatters a fresh batch of clips.

💡 Did you know?

Paperclips are made of steel, which contains iron. Iron is ferromagnetic, meaning its atomic magnetic moments line up with a nearby field, so a paperclip becomes a temporary magnet itself and is pulled toward the source, just as the clips chase the magnet here.

Frequently asked questions

What does this simulation demonstrate?

It shows magnetic attraction: a bar magnet pulls scattered paperclips toward it. The closer a clip is, the stronger the pull, so nearby clips rush in and stick to the magnet while distant ones stay put under gravity. It is a simple, visual introduction to how magnets attract iron-based objects.

How is the magnetic force calculated?

For each paperclip the model measures the distance to the magnet. If that distance is under 200 pixels, it adds a velocity toward the magnet equal to the strength value times 0.5, divided by the distance scaled by 0.02. This makes the pull rise steeply as a clip approaches, which is why clips accelerate and snap on near the magnet.

What do the sliders and Reset button do?

The Strength slider (range 5 to 20) controls how hard the magnet pulls. The Clips slider (10 to 100 in steps of 10) sets how many paperclips are on screen. Reset re-scatters a new set of clips. The magnet itself follows your mouse pointer or finger.

Is the physics realistic?

It is a simplified, kid-friendly model rather than an exact one. Real magnetic attraction between a dipole and a small magnetic object falls off roughly as the inverse fourth power of distance, whereas this toy uses a gentler inverse-distance pull plus drag and gravity for smooth, watchable motion. The qualitative idea, stronger closer up, is faithful.

Why do real paperclips get attracted to a magnet?

Steel paperclips contain iron, a ferromagnetic metal. When a magnet comes near, the iron's microscopic magnetic regions, called domains, align with the magnet's field, turning the clip into a temporary magnet whose opposite pole faces the magnet. Opposite poles attract, so the clip is drawn in. Remove the magnet and the domains relax, and the clip loses most of its magnetism.