Prompt
Create a self-contained, complete, and embeddable simulation in html, css, and javascript to demonstrate magnetic fields for junior high students learning about magnetism. Include a user selection for permanent bar, horseshoe, ring, and round magnets, and electromagnets in all those shapes with a user option to turn the electromagnet on and off and to increase its power. Allow the user to sprinkle iron filings on the magnet's area and show the shape of the field. Add a button to clear the filings prior to changing to a different magnet. Make the theme navy blue, white, black, and gray, but make the magnet's area have sufficient visual contrast for the user.
Iteration
Make the filings slightly longer to make the magnetic field more plainly obvious.