# Log Rule

> A working slide rule engraved with seven scales (K, A, B, CI, C, D and L) that works its own exercises in multiplication, division, squares, cubes, reciprocals and logarithms, while a readout card shows every scale under the red hairline; drag the slide or the glass to take over.

- 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/log-rule

## What you get

Bring two figures to multiply or divide, or one of the seven worked exercises. The Skill returns a downloadable Skill and a runnable slide-rule scene.

## Install

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

```text
/log-rule build a working slide-rule scene for <your exercises, maker and copy>
```

## How it works

1. **Build the slide rule page** Log Rule needs only npm install, which brings in playwright-core for the checks, then npm run build for one bilingual dist/index.html or npm run build:zh for a Chinese-only page from the bench-zh brief. The ivory rule, nickel maker's plate, worksheet, readout card and instruction sheet are Canvas 2D and HTML drawn by code with no image assets and no network requests.
2. **Engrave seven logarithmic scales** Every figure sits at X(v) = log10(v)·1000 along a one-decade scale. K packs three decades and A two, D and C read single decades, CI runs backwards and L is cut in even tenths. Each interval picks the finest graduation step that leaves about 2 px between strokes, numerals that would collide are dropped, and the stock and slide are baked once into offscreen canvases.
3. **Work, drag and check the rule** Open dist/index.html, or add ?lang=zh-CN for Chinese, and the rule starts working its seven exercises. Drag the middle strip to move the slide, drag above or below it to walk the glass, hold for a loupe or type two figures and press the set button. npm run shoot then checks the log mapping, every operation and the rubber-band end stops in headless Chrome.

## FAQ

### How does Log Rule multiply two numbers?

Log Rule multiplies by adding lengths. Every figure on the C and D scales is engraved at a distance from the left index equal to its logarithm, so parking the slide's index over a on D and moving the hairline to b on C lands the hairline on the mark for a × b. Running the same motion backwards divides, as the instruction sheet sketches beside the rule.

### Which scales does Log Rule have?

Log Rule is engraved with seven scales. K reads cubes across three decades, A reads squares across two, B, C and CI sit on the sliding strip, D is the main single-decade scale and L gives the mantissa of the logarithm in even tenths. CI runs from 10 down to 1 and reads reciprocals, and π is marked in red on A, B, C and D.

### What exercises does Log Rule work by itself?

Log Rule loops through seven worked exercises: 2.5 × 3.4, 6 × 7 on the right index, 7.8 ÷ 2.6, 3.5 squared, 2.2 cubed, 1 ÷ 6.4 and lg 5. Each exercise is a list of slide and cursor moves, and the tabbed worksheet highlights the current step and fills in the figure under the hairline. After about six seconds without input the exercises resume.

### Why does Log Rule read 4.2 for 6 × 7?

Set from the left index, the glass would run past the far end of the rule, so Log Rule parks the right index over 6 instead and borrows a decade. The D scale then shows the figures 4.2, and the worksheet notes that the answer is 42. As on a real slide rule, the scale gives the digits and the reader places the decimal point.

### How precise are the readings in Log Rule?

Log Rule reads about three significant figures, as a real 25 cm rule does. The readout card under the glass shows the figure on every scale at the hairline with the same rounding, and slide scales show nothing once the hairline leaves the slide. Close readings are easier with the loupe, which appears over the scales while you press and hold anywhere on the rule.

### Can I use Log Rule with a keyboard or a phone?

Yes. When Log Rule has focus the arrow keys nudge the glass, Shift moves the slide instead and Alt moves in fine steps. On touch screens the same drags work with a finger, and below 980 px wide the worksheet and instruction sheet stack under the rule. With reduced motion set, moves jump to their end instead of gliding.

### Is the slide rule maker in Log Rule real?

No. The maker's name, the pattern number and the exercises in Log Rule are fictional and illustrative, chosen for the page rather than copied from a catalogue. The scene draws everything with code in one HTML file, calls no model and makes no network requests; npm install fetches only playwright-core, which the headless checks use.

## Examples

- Log Rule slide rule (scene)
- Pattern 27 on the Bench (video)
