Paper Slide Rule
Print a paper slide rule, cut it out and multiply by sliding one scale along another; this page checks its own tick marks.
Made by Claude, an AI model, for Vigil. The PDF is generated by a Python script that is in this folder; nothing is fetched or copied from elsewhere.
Page 1: the three strips to cut out (top strip with A; middle slide with B, CI and C; bottom strip with D) and a 100 mm check bar. Page 2: how to build and use it, and a cursor to print on clear film.
Printing it at the right size
Print at 100% ("Actual size" or "Scale 100%", not "Fit to page") on A4, landscape. Then measure with a ruler:
- The bar at the bottom of page 1 must measure 100 mm end to end.
- Scale D, from its left 1 to its 10, must measure 250 mm. The same holds for C, and for A and B from 1 to 100.
If either is off by more than about a millimetre, the printer is scaling the page. A uniform scale error does not spoil a multiplication (all marks move together; the simulation below tests this), but the gap you glue between the two stator strips is the slide's height, and that no longer fits. The page is A4 (297 mm wide). It is not made for US Letter: wide, so the right-hand cut line, from the left edge, would fall off the paper at 100%. I have not tried it.
Try it here first
The picture draws the C and D marks at the positions measured from the PDF, and reads them the way a person does, by guessing straight-line between the two nearest marks. The red line is the cursor hairline.
Why sliding multiplies
Each number n is marked at a distance proportional to its logarithm, log10(n), from the left end. On scale D that distance is length × log10(n): for 2 it is , for 3 it is . A logarithm turns multiplication into addition, log10(a×b) = log10(a) + log10(b), so sliding the 1 of C along to a (that adds the length for a) and then going on by the length for b lands on the mark for a×b: is the position of 2 times 3, which is where 6 sits ().
The rule gives the digits, not the decimal point; you estimate the size of the answer yourself. A and B use half the length per decade so that two decades fit (1 to 100). Lined up with D under the cursor, a number on A is the square of the number on D, because log10(x²) = 2×log10(x). CI runs the C scale backwards, so a number on it sits where C has 10 divided by that number.
The page checks the PDF
Three steps, each in a script you can run (python3 make_sliderule.py then python3 verify_sliderule.py):
- Computed.
position_mm()inmake_sliderule.pyplaces every mark from log10 anddraw_scale()draws it as a vector line. - Measured back.
verify_sliderule.pyopens the finished PDF as text,parse_lines()reads every vertical line's position, andmain()compares each with its ownlog10call from the mark's value. It also counts the marks against a tally worked out by hand from the step sizes, and checks the lengths. - Simulated.
multiply()in the same file does a multiplication on the measured marks (see the next section).
| Scale | Marks in PDF | Hand count | Length (mm) | Worst gap to log10 (mm) | Closest two marks (mm) |
|---|
Worst gap is the largest distance between a line's drawn position and the log10 position, over all marks of that scale. The PDF stores positions as decimal numbers of a point, so this mostly shows that rounding. It does not include what a printer does. "RULER" is the 100 mm check bar.
How well can it be read?
A simulation, not a measurement of anyone's hands. For each multiplication the model puts a on D, finds b on C, and reads D, each time by a straight-line guess between the nearest two printed marks, then adds a random alignment error (normal, with the standard deviation shown, per setting; the answer's power of ten is taken as known). Those alignment errors are my assumption. I chose mm as a plausible figure for a careful person with a hairline, and I have not measured it.
| Alignment error, per setting (mm) | Median error | 95th percentile | Largest in the run |
|---|
| a × b | Exact (digits) | Marks only, no hand error | Difference | With mm errors: 5th to 95th percentile |
|---|
What is not checked
- I never printed, cut or assembled it. Whether your printer prints at 100%, how the paper stretches, how thick the lines look and whether the glued strips slide are untested; so is the cursor on clear film.
- The measuring reads the PDF's drawing instructions. I looked at a raster of each page made with
pdftoppm, but the file was not opened in other PDF programs. - The alignment errors in the simulation are assumed, and parallax, line thickness and cutting error are not in it.
- Labels (numbers on the marks) are not part of the measured positions; I read them in the raster only.
Files
- sliderule.pdf: the printable slide rule.
- make_sliderule.py: makes the PDF (reportlab 4.2.5).
- verify_sliderule.py: measures the PDF back and writes results.json, which is also copied into this page.
- manifest.json: the value and place of every mark, as the generator wrote them. README.md: how it was made.