Skip to content
Paper Sheet Studio

Geometry contract · rev v1

How every sheet is computed

Each paper family is generated by a pure, versioned geometry function that turns a configuration into a vector scene and a human-readable calculation audit. This page documents the contract those functions follow — the unit conversion, the fitting rule, and the formula version and reference geometry for each family. “Looks about right” is not acceptable for technical paper, so none of these are approximate.

One canonical unit, converted exactly

All geometry is computed in PDF points using two exact definitions: 1 inch = 72 points, and 1 inch = 25.4 millimetres. User-entered metric values stay decimal until a single deterministic conversion at the boundary; rounding happens only at the output edge required by the PDF or SVG writer. The result is that a 5 mm grid is 14.1732… points per cell, and ten cells measure exactly 50 mm when printed at 100% scale.

1 in = 72 pt (exact)

1 in = 25.4 mm (exact)

1 mm = 72 / 25.4 pt ≈ 2.83465 pt

The fitting rule

A requested spacing is honoured exactly; the page is not silently re-divided to make a grid fit. The number of cells is the floor of the usable dimension over the spacing, and any leftover space — the fraction of a cell that does not fit inside the margins — is reported in the audit rather than stretched into the grid. The user’s spacing is never altered invisibly. Where a count is requested instead of a spacing (fitted mode), the effective spacing is the usable dimension divided by the count, and the difference from any requested value is stated.

No line is ever drawn outside the declared printable box: every family clips its geometry to the usable area inside the margins, and the preview’s printable-area overlay marks that box exactly.

Formula version and contract per family

The formula version is printed in every output summary and embedded in exported PDF metadata, so a sheet can always be traced to the exact geometry that produced it.

Formula version per paper family
FamilyFormula versionRoute
Plain square gridsquare-grid-v1/graph-paper
Ruled / linedruled-v1/lined-paper
Dot griddot-grid-v1/dot-grid-paper
Coordinate planecoordinate-v1/studio
Isometricisometric-v1/isometric-graph-paper
Hex gridhex-v1/hex-grid-paper
Polarpolar-v1/polar-graph-paper
Engineeringengineering-v1/engineering-graph-paper
Log / semi-loglog-v1/logarithmic-graph-paper
Handwritinghandwriting-v1/handwriting-paper

Plain square grid

square-grid-v1

A uniform square lattice with an optional heavier major line every N cells and optional centre axes. Columns and rows are the floor of the usable dimension divided by the requested spacing; leftover space is reported, never absorbed.

  • usable = page − left margin − right margin (and top/bottom)
  • columns = floor(usable width / spacing)
  • rows = floor(usable height / spacing)
  • line xᵢ = left + i · spacing, i = 0 … columns

Ruled / lined

ruled-v1

Horizontal rules at a fixed line spacing, with an optional tinted margin rule and an optional header block of wider-spaced rules. Line count is the floor of the available height over the spacing.

  • available height = usable height − header offset
  • lines = floor(available height / line spacing)
  • rule yⱼ = top + offset + j · spacing

Dot grid

dot-grid-v1

A lattice of dots at the intersections of a square grid, with adjustable radius and opacity and optional larger major markers every N dots. Dots are placed at computed coordinates; the count is (columns+1) × (rows+1).

  • columns = floor(usable width / spacing), rows = floor(usable height / spacing)
  • dot (i,j) at (left + i·spacing, top + j·spacing)
  • total dots = (columns + 1) · (rows + 1)

Coordinate plane

coordinate-v1

A square grid with emphasised x and y axes whose origin is placed at a configurable fraction of the page, optional tick numbering, and quadrant-aware axis drawing. Lives inside the Studio editor.

  • origin = (left + originXFrac · usable width, top + originYFrac · usable height)
  • grid lines as square grid; axes drawn through the origin

Isometric

isometric-v1

A lattice of equilateral triangles whose lines run at 0°, 60° and 120°. The vertical row height is derived from the triangle side, not set independently, which is what keeps circles circular and cubes undistorted.

  • row height = side · √3 / 2
  • rows = floor(usable height / row height)
  • three line families at 0°, +60°, −60° (orientation flips the handedness)

Hex grid

hex-v1

A tessellation of regular hexagons, flat-top or pointy-top. Every other dimension follows from the side length; the centre-to-centre distance between adjacent hexes is side · √3, which is what makes the tiling close without gaps.

  • centre-to-centre (adjacent) = side · √3
  • column and row pitch derived from side and orientation
  • vertices placed at 60° increments around each centre

Polar

polar-v1

Concentric rings at a fixed radial spacing and an even division of 360° into radial spokes, with degree or radian labels. Rings are exactly concentric and spokes exactly equally spaced.

  • rings = floor(max radius / ring spacing)
  • spoke angle k = k · 360° / radials (or k · 2π / radials)
  • centre placed at the middle of the usable area

Engineering

engineering-v1

A two-level hierarchy: fine minor lines with a heavier major line every N minors, plus an optional drawing border. Major spacing is N times the minor spacing; both column/row counts are reported.

  • major spacing = majorEvery · minor spacing
  • minor columns = floor(usable width / minor spacing)
  • major columns = floor(minor columns / majorEvery)

Log / semi-log

log-v1

Subdivisions generated mathematically, not evenly spaced. Within each decade the line for value m sits at log(m)/log(base) of the way across the cycle; decade boundaries carry a heavier weight and optional labels. Semi-log makes one axis logarithmic, log-log both.

  • cycle width = usable width / cycles
  • subdivision position = (log(m) / log(base)) · cycle width, m = 1 … base−1
  • decade lines at whole multiples of the cycle width

Handwriting

handwriting-v1

A three-line system per row — solid baseline, dashed midline, descender line — defined by one baseline spacing and two ratios, so the whole row scales proportionally. Optional slant guides at a chosen angle and an optional picture area.

  • midline offset = midlineRatio · baseline spacing (above baseline)
  • descender depth = descenderRatio · baseline spacing (below baseline)
  • rows = floor(usable height / baseline spacing)

Rendering and output

Every family emits the same intermediate vector scene — a list of lines, circles, rectangles, paths and text in point coordinates. The SVG preview and the PDF export are two adapters over that one scene, so the preview and the downloaded file share identical geometry; nothing is rasterised on the way to PDF. Text labels are treated as plain text and escaped, never interpreted as markup.

Print at 100% scale and disable “fit to page”: browser and driver print dialogs can otherwise apply a uniform 3–7% shrink that defeats the exact geometry. Calibration — measuring one printed reference length and applying the ratio as a correction — fixes uniform scale only; it cannot correct printer non-linearity, paper stretch, skew, or unprintable hardware margins, and this site does not claim otherwise.