# Iron Filings Desk

> A sheet of paper dusted with thousands of iron filings, each easing toward the local field direction from draggable magnets; a third creep up the gradient into ridges.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Interactive 3D](https://www.sandbase.ai/skills/interactive-3d)
- Version: 1.0.1
- Runs online: yes
- Page: https://www.sandbase.ai/skills/interactive-3d/iron-filings-desk

## What you get

Bring a set of magnets and the paper to dust. The Skill returns a downloadable Skill and a runnable filings sheet.

## Install

Download the Skill package from https://www.sandbase.ai/skills/interactive-3d/iron-filings-desk (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/iron-filings-desk scatter <your filings> around <your magnets>
```

## How it works

1. **Place the magnets on paper** Iron Filings Desk opens a daylight paper sheet with fibre texture, registration marks and a scale bar, then carries red and blue magnets in from a tray. A brief in assets/briefs supplies the document title, note and hint. A prompt such as 'Use iron-filings-desk to scatter brass filings around two bar magnets' sets the content your agent builds.
2. **Let the filings follow the field** src/filings.js sums softened monopoles from every bar, horseshoe and disc, and each filing eases toward the local field direction faster where the field is strong. A third of the filings creep up the field-strength gradient into pole tufts. Dragging moves a magnet, double-click flips its poles, and a tap sends a ring that jitters the filings into cleaner lines.
3. **Build and verify offline** The scene builds with npm install and npm run build in Node and runs in any browser from one offline HTML page. npm run shoot passes 11 headless checks: filings seeded, poles built, the bridge region aligned, a flip reversing the field and a moved magnet redirecting it. The published 1.0.1 release confirms four draggable magnets, zero external requests and drag, flip and tap all working.

## FAQ

### What does Iron Filings Desk show?

Iron Filings Desk shows thousands of iron filings on a paper sheet lining up with the field of draggable magnets. A steel compass needle swings to the field, and an optional pencil-blue overlay traces field lines. It suits magnet toys, physics-classroom canvases and any demo that makes an invisible field visible.

### Is the Iron Filings Desk magnetic field computed live?

Yes. Iron Filings Desk recomputes a pole table whenever a magnet moves and sums softened monopoles at every filing each frame. Each bar puts its poles at 0.41 of its length along its axis, a horseshoe puts two across its gap, and a disc acts as a single pole.

### Why do filings in Iron Filings Desk bunch into ridges?

Iron Filings Desk lets a third of its filings creep up the gradient of field strength, not only rotate in place. Those filings gather into spiky tufts near the poles and settle under friction, so lines thicken where the field is strongest. Without the creep rule the sheet would show evenly spaced, rotated slivers.

### Does Iron Filings Desk need an API key or a paid model?

No. Iron Filings Desk is plain JavaScript that runs in the browser with seeded randomness and makes no network request, so using the scene adds nothing to a SandBase bill. The release check recorded zero external requests and zero console errors. Only Node and the pinned npm packages are needed to build it.

### Can Iron Filings Desk show fields other than magnets?

Yes, with code changes. Iron Filings Desk keeps the field in one function, field(x,y), plus the align and creep rule. Swapping that function for gravity wells, charges, pressure or a drawn flow lets the same filings visualise a different field. The shipped build only includes magnets.

### What happens when I flip a magnet in Iron Filings Desk?

Iron Filings Desk swaps that magnet's poles when you double-click it. Where opposite poles now face each other, the filings redraw into bridging lines; where like poles face, they push apart. The headless check confirms that a flip reverses the field direction.

## Examples

- Iron Filings Desk (scene)
- Filings on Paper (video)
