SharpMeow commited on
Commit
01ea09f
·
verified ·
1 Parent(s): 3e61666

Umbilici 1.8.0 from Scrolls main 912b8e0436975e6ba15f7c526bc771223ccde47b

Browse files
Files changed (7) hide show
  1. .gitignore +2 -0
  2. README.md +28 -17
  3. app.js +126 -38
  4. data/lines.json +0 -0
  5. index.html +16 -15
  6. style.css +21 -3
  7. tools/build_lines.py +5 -3
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ data/
2
+ og.jpg
README.md CHANGED
@@ -7,7 +7,7 @@ sdk: static
7
  app_file: index.html
8
  pinned: false
9
  license: apache-2.0
10
- short_description: Center lines of 22 Herculaneum scrolls, in live X-ray CT
11
  tags:
12
  - vesuvius-challenge
13
  - herculaneum
@@ -24,17 +24,24 @@ datasets:
24
  A carbonized Herculaneum scroll is a sheet of papyrus wound around a center. Its center line, the umbilicus,
25
  is where tracing tools such as VC3D and villa's lasagna start. This page draws every public center line we know
26
  of for the 22 scans on the [Vesuvius Challenge prize page](https://scrollprize.org/prizes) (the 21 First Letters
27
- volumes and PHerc1447, read 23 October 2026), over X-ray CT that your browser streams from the open data.
28
-
29
- - **Array**: all 22 lines side by side, heights to scale in millimetres. Person-made lines are ice blue; the nine
30
- lines from Chase Hendrick's Center Finder are amber. The slider exaggerates side-to-side drift (default 3x).
31
- - **X-ray**: one scan. A radiograph (or maximum intensity) render of the whole scan at about 0.3 mm per voxel,
 
 
 
 
 
 
 
32
  the lines inside it, and an axial slice at 70 to 80 µm per pixel with every line's crossing marked. The slice
33
  follows its height slider live (from the 0.3 mm CT already loaded, then sharpens when the slider rests), can turn
34
  with the 3D view ("turn with view"), and can be hidden and brought back from the bottom right.
35
  - **Lasagna**: PHerc0175A with villa's lasagna field: its sheet channel (cos) at nine heights, its surface
36
  normals as short needles coloured by orientation, and the Center Finder's line through them.
37
- - **Data**: every number on the page as sortable tables (29 lines, 22 scans), with `lines.csv`, `scans.csv`,
38
  `points.csv` and `umbilici.json` downloads.
39
  - **Guide**: five tabs for every level of reader: Start here, VC3D and villa, For researchers (every statistic
40
  defined), Data details (frames, pyramids, encodings) and Credits.
@@ -50,20 +57,23 @@ that reopens the exact view; and the scan's points as CSV or JSON.
50
  | Alexey Drobkov ([herculaneum-umbilici](https://github.com/AlexeyDrobkovStrikesBack/herculaneum-umbilici)) | 10 | MIT |
51
  | Abd Elilah, manual curves ([umbilicus-cross-validation](https://github.com/TAUIL-Abd-Elilah/umbilicus-cross-validation)) | 6 | CC BY 4.0 |
52
  | Iyan Dopico (PHerc1218, as shipped in Drobkov's repository) | 1 | MIT |
53
- | Vesuvius Challenge open data (`representations/umbilicus`) | 3 | CC BY-NC 4.0 |
54
- | Chase Hendrick's Center Finder (model output) | 9 | CC BY-NC 4.0 |
55
 
56
  Every file, with its hash, upstream link and note, is in
57
  [SharpMeow/vesuvius-center-lines](https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines). Abd Elilah's
58
  PHerc1203 curve is shown faded: its author withdrew it from recommended use (repository README, 16 Aug 2026).
59
 
60
- The nine Center Finder lines are model output, made for the 1.2 m scans that had no person's line. No person has
61
- checked their ends on CT. An automatic CT end check (dataset release v2.2, 23 Oct 2026) compares each end with the
62
- scroll center the CT shows there, estimated from the scan alone, with a 4 mm bar: 14 of the 18 ends pass and 4 are
63
- flagged (PHerc0175B high, PHerc0306B low, PHerc0490B low, PHerc0846A high). Five passing ends are marked CT recap:
64
- their last 10 mm was replaced by a straight fit to the CT, so the pass says the CT supports that end. The page shows
65
- PASS or FLAG per line and the grade of each end on its card. Model output: no end has been checked on CT by a
66
- person. Each line's card says which ends are usable.
 
 
 
67
 
68
  ## Using the lines in VC3D and villa
69
 
@@ -73,7 +83,7 @@ villa's source (`main`, read 23 Oct 2026):
73
  - VC3D ([`volume-cartographer/core/src/Umbilicus.cpp`](https://github.com/ScrollPrize/villa/blob/main/volume-cartographer/core/src/Umbilicus.cpp))
74
  reads a bare array of points or an object with `points` or `control_points`, each point with x, y and z, and an
75
  optional `metadata` block with `voxelsize_um`, `volume` and the grid `volume_width`, `volume_height`,
76
- `volume_slices` (all three or none). 22 of the 29 files carry that stamp, matching their scan's grid; Abd
77
  Elilah's six and Iyan Dopico's are bare points. VC3D interpolates linearly between points and holds the end
78
  points' x and y beyond them.
79
  - spiral-fitting ([`spiral-fitting/umbilicus.py`](https://github.com/ScrollPrize/villa/blob/main/spiral-fitting/umbilicus.py))
@@ -119,6 +129,7 @@ The page is driven from the console or a headless browser through `window.umbili
119
  | `table('lines' or 'scans')`, `csv('lines' or 'scans' or 'points')` | the Data tables as objects or CSV text |
120
  | `guide(tab)`, `data(tab)` | open the guide (`basics`, `vc3d`, `research`, `data`, `credits`) or the Data tables |
121
  | `bench(n)` | renders `n` frames and returns milliseconds per frame and the pixel ratio |
 
122
  | `settings(obj)` | read or change the viewer settings: `glow` (0 to 3), `radius` (0 to 1), `quality` (`auto`, `high`, `low`), `film`, `spin`, `inset` (the slice panel shown), `turn` (the slice turns with the 3D view) |
123
 
124
  URL parameters: `?mode=scan&scan=PHerc0191&z=10400`, `?mode=lasagna&scan=PHerc0175A&z=6400`, `?ex=5`,
 
7
  app_file: index.html
8
  pinned: false
9
  license: apache-2.0
10
+ short_description: Center lines of 33 Herculaneum scans, in live X-ray CT
11
  tags:
12
  - vesuvius-challenge
13
  - herculaneum
 
24
  A carbonized Herculaneum scroll is a sheet of papyrus wound around a center. Its center line, the umbilicus,
25
  is where tracing tools such as VC3D and villa's lasagna start. This page draws every public center line we know
26
  of for the 22 scans on the [Vesuvius Challenge prize page](https://scrollprize.org/prizes) (the 21 First Letters
27
+ volumes and PHerc1447, read 23 October 2026) and for 11 other public scans that are not on the prize page (since
28
+ 1.8.0), over X-ray CT that your browser streams from the open data.
29
+
30
+ - **Array**: every scan's lines side by side, heights to scale in millimetres: the prize scans in the front two rows
31
+ (people's lines, then the Center Finder's), the other public scans in the back row. Each maker has its own color
32
+ (Vesuvius Challenge cyan, Alexey Drobkov pink, Abd Elilah violet, Iyan Dopico white, Chase Hendrick's Center
33
+ Finder amber); click a maker in the key to hide its lines, or untick one line on a scan card, and the view link
34
+ keeps it (`off=`). Scan names follow a traffic light from the automatic CT end check: green when both Center
35
+ Finder ends passed, yellow for caution (a CT recap, an end it could not judge, or a 2.4 µm scan it was never
36
+ tuned on), red when an end was flagged. The slider exaggerates side-to-side drift (default 3x).
37
+ - **X-ray**: one scan. A radiograph (or maximum intensity) render of the whole scan at about 0.3 mm per voxel
38
+ (0.15 to 0.23 mm on a 2.4 µm scan, with fewer heights),
39
  the lines inside it, and an axial slice at 70 to 80 µm per pixel with every line's crossing marked. The slice
40
  follows its height slider live (from the 0.3 mm CT already loaded, then sharpens when the slider rests), can turn
41
  with the 3D view ("turn with view"), and can be hidden and brought back from the bottom right.
42
  - **Lasagna**: PHerc0175A with villa's lasagna field: its sheet channel (cos) at nine heights, its surface
43
  normals as short needles coloured by orientation, and the Center Finder's line through them.
44
+ - **Data**: every number on the page as sortable tables (40 lines, 33 scans), with `lines.csv`, `scans.csv`,
45
  `points.csv` and `umbilici.json` downloads.
46
  - **Guide**: five tabs for every level of reader: Start here, VC3D and villa, For researchers (every statistic
47
  defined), Data details (frames, pyramids, encodings) and Credits.
 
57
  | Alexey Drobkov ([herculaneum-umbilici](https://github.com/AlexeyDrobkovStrikesBack/herculaneum-umbilici)) | 10 | MIT |
58
  | Abd Elilah, manual curves ([umbilicus-cross-validation](https://github.com/TAUIL-Abd-Elilah/umbilicus-cross-validation)) | 6 | CC BY 4.0 |
59
  | Iyan Dopico (PHerc1218, as shipped in Drobkov's repository) | 1 | MIT |
60
+ | Vesuvius Challenge open data (`representations/umbilicus`) | 7 (4 not on the prize page) | CC BY-NC 4.0 |
61
+ | Chase Hendrick's Center Finder (model output) | 16 (7 not on the prize page) | CC BY-NC 4.0 |
62
 
63
  Every file, with its hash, upstream link and note, is in
64
  [SharpMeow/vesuvius-center-lines](https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines). Abd Elilah's
65
  PHerc1203 curve is shown faded: its author withdrew it from recommended use (repository README, 16 Aug 2026).
66
 
67
+ The 16 Center Finder lines are model output, made for the scans that had no person's line: nine 1.2 m prize
68
+ scans, then (dataset release v2.3, 24 Oct 2026) PHerc0343, PHerc0814 and PHerc0841 at 1.2 m and PHerc1299,
69
+ PHercMAN5, PHercMANB and PHercParis3 at 2.4 µm. No person has checked their ends on CT. An automatic CT end check
70
+ compares each end with the scroll center the CT shows there, estimated from the scan alone, with a 4 mm bar. On the
71
+ nine prize lines (v2.2, 23 Oct 2026) 14 of the 18 ends pass and 4 are flagged (PHerc0175B high, PHerc0306B low,
72
+ PHerc0490B low, PHerc0846A high); five passing ends are marked CT recap: their last 10 mm was replaced by a
73
+ straight fit to the CT, so the pass says the CT supports that end. On the seven v2.3 lines all 14 ends pass, 2 after
74
+ a CT recap (PHerc0343 low, PHercMANB high); the check was tuned only on 1.2 m scans, so its grades on the four 2.4 µm
75
+ scans are marked untested and no end there is called usable. The page shows the grade per line and per end on its
76
+ card. Model output: no end has been checked on CT by a person. Each line's card says which ends are usable.
77
 
78
  ## Using the lines in VC3D and villa
79
 
 
83
  - VC3D ([`volume-cartographer/core/src/Umbilicus.cpp`](https://github.com/ScrollPrize/villa/blob/main/volume-cartographer/core/src/Umbilicus.cpp))
84
  reads a bare array of points or an object with `points` or `control_points`, each point with x, y and z, and an
85
  optional `metadata` block with `voxelsize_um`, `volume` and the grid `volume_width`, `volume_height`,
86
+ `volume_slices` (all three or none). 33 of the 40 files carry that stamp, matching their scan's grid; Abd
87
  Elilah's six and Iyan Dopico's are bare points. VC3D interpolates linearly between points and holds the end
88
  points' x and y beyond them.
89
  - spiral-fitting ([`spiral-fitting/umbilicus.py`](https://github.com/ScrollPrize/villa/blob/main/spiral-fitting/umbilicus.py))
 
129
  | `table('lines' or 'scans')`, `csv('lines' or 'scans' or 'points')` | the Data tables as objects or CSV text |
130
  | `guide(tab)`, `data(tab)` | open the guide (`basics`, `vc3d`, `research`, `data`, `credits`) or the Data tables |
131
  | `bench(n)` | renders `n` frames and returns milliseconds per frame and the pixel ratio |
132
+ | `show(kind, name, on)` | shows or hides lines: `kind` `'source'` with a maker (`bucket`, `drobkov`, `tauil`, `dopico`, `finder`) or `'line'` with `SCROLL:SOURCE`; `on` true or false, omitted toggles; returns `{off}`, also kept in the URL as `off=` |
133
  | `settings(obj)` | read or change the viewer settings: `glow` (0 to 3), `radius` (0 to 1), `quality` (`auto`, `high`, `low`), `film`, `spin`, `inset` (the slice panel shown), `turn` (the slice turns with the 3D view) |
134
 
135
  URL parameters: `?mode=scan&scan=PHerc0191&z=10400`, `?mode=lasagna&scan=PHerc0175A&z=6400`, `?ex=5`,
app.js CHANGED
@@ -1,4 +1,4 @@
1
- // Umbilici: the center lines of the prize-eligible Herculaneum scans, over live X-ray CT.
2
  // Apache 2.0, Chase Hendrick. CT is read in the visitor's browser from the Vesuvius Challenge open-data bucket.
3
  import * as THREE from 'three';
4
  import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
@@ -7,12 +7,19 @@ import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';
7
  import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
8
  import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
9
 
10
- const VERSION = '1.7.0';
11
  const DATASET = 'https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines';
12
  const LASAGNA_SCROLL = 'PHerc0175A';
13
  const ICE = new THREE.Color('#89f0ff');
14
  const AMBER = new THREE.Color('#ffb347');
 
 
 
 
 
15
  const COARSE = matchMedia('(pointer: coarse)').matches;
 
 
16
  const $ = (id) => document.getElementById(id);
17
 
18
  // ---------- state ----------
@@ -33,7 +40,7 @@ renderer.setSize(innerWidth, innerHeight);
33
  const scene = new THREE.Scene();
34
  scene.background = new THREE.Color('#02060a');
35
  const camera = new THREE.PerspectiveCamera(32, innerWidth / innerHeight, 1, 20000);
36
- camera.position.set(-620, 330, 2350).multiplyScalar(Math.max(1, 1.25 / camera.aspect));
37
  const controls = new OrbitControls(camera, canvas);
38
  controls.enableDamping = true;
39
  controls.dampingFactor = 0.08;
@@ -72,8 +79,8 @@ addEventListener('resize', () => {
72
  if (S.mode === 'array' && !userMoved) fitArray();
73
  S.dirty = true;
74
  });
75
- function fitArray() { const k = Math.max(1, 1.25 / camera.aspect); const a = controls.getAzimuthalAngle(); const r = Math.hypot(620, 2350) * k;
76
- camera.position.set(Math.sin(a) * r, 330 * k, Math.cos(a) * r); camera.far = 20000; camera.updateProjectionMatrix(); }
77
 
78
  // ---------- helpers ----------
79
  const mm = (s, v) => v * s.voxel_um / 1000;
@@ -91,8 +98,33 @@ function lineAt(l, z) {
91
  function lineMean(l) { const p = linePts(l); let x = 0, y = 0; for (const q of p) { x += q[0]; y += q[1]; } return [x / p.length, y / p.length]; }
92
  function drift(s, l) { const [mx, my] = lineMean(l); let d = 0; for (const q of linePts(l)) d = Math.max(d, Math.hypot(q[0] - mx, q[1] - my)); return mm(s, d); }
93
  const isFinder = (l) => l.source === 'finder';
 
 
 
 
94
  const hasFinder = (s) => s.lines.some(isFinder);
95
  function gradeOf(s) { const f = s.lines.find(isFinder); return f ? f.grade : null; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  function usable(l) {
97
  if (Array.isArray(l.usable)) return l.usable.length ? l.usable.join(', ') : 'none';
98
  const m = /usable ends: ([a-z, ]+)/.exec(l.note || ''); return m ? m[1] : null;
@@ -108,6 +140,7 @@ const GRADE_TEXT = {
108
  FLAG: 'the automatic CT end check flagged an end: there the line sits more than 4 mm from the center the CT shows',
109
  VOID: 'the end check could not judge this line',
110
  };
 
111
 
112
  // ---------- statistics (definitions: Guide, For researchers) ----------
113
  const RAW = (l) => `${DATASET}/resolve/main/${l.file}`;
@@ -148,7 +181,7 @@ function lineRows() {
148
  const t = statsOf(s, l);
149
  return {
150
  scroll: s.scroll, scan: s.scan, volume: s.volume, voxel_um: s.voxel_um, source: l.source, maker: S.data.sources[l.source].label,
151
- kind: l.kind, grade: l.grade || '', ct_end_low: endText(l, 'low'), ct_end_high: endText(l, 'high'), usable_ends: isFinder(l) ? (usable(l) || '') : '', withdrawn: l.note.includes('withdrawn'),
152
  ...t, licence: l.licence, sha256: l.sha256, file: RAW(l), upstream: l.upstream, note: l.note,
153
  };
154
  }));
@@ -212,9 +245,11 @@ const hitMeshes = [];
212
  const labels = [];
213
  function buildArray() {
214
  arrayGroup.clear(); hitMeshes.length = 0; $('labels').innerHTML = ''; labels.length = 0;
215
- const people = S.data.scrolls.filter((s) => !hasFinder(s));
216
- const finder = S.data.scrolls.filter(hasFinder);
217
- const rows = [[people, -150], [finder, 170]];
 
 
218
  for (const [list, rz] of rows) {
219
  const step = 112, x0 = -(list.length - 1) * step / 2;
220
  list.forEach((s, i) => {
@@ -222,8 +257,9 @@ function buildArray() {
222
  const H = mm(s, s.shape[0]);
223
  const [cx, cy] = lineMean(s.lines[0]);
224
  for (const l of s.lines) {
 
225
  const pts = linePts(l).map(([x, y, z]) => [mm(s, x - cx) * S.ex, mm(s, z), mm(s, y - cy) * S.ex]);
226
- g.add(tube(pts, isFinder(l) ? AMBER : ICE, 0.9, l.note.includes('withdrawn') ? 0.45 : 1));
227
  }
228
  const tint = hasFinder(s) ? AMBER : ICE;
229
  g.add(ring(26, 0, tint, 0.28)); g.add(ring(26, H, tint, 0.12));
@@ -236,7 +272,8 @@ function buildArray() {
236
  const hit = new THREE.Mesh(new THREE.CylinderGeometry(40, 40, H, 12), new THREE.MeshBasicMaterial({ visible: false }));
237
  hit.position.y = H / 2; hit.userData.scroll = s.scroll; g.add(hit); hitMeshes.push(hit);
238
  arrayGroup.add(g);
239
- const el = document.createElement('div'); el.className = 'lbl' + (hasFinder(s) ? ' cf' : '');
 
240
  el.innerHTML = `<b>${s.scroll.replace('PHerc', '')}</b>${fmt(H, 0)} mm`;
241
  $('labels').appendChild(el); labels.push({ el, g, s });
242
  });
@@ -266,6 +303,7 @@ async function zmeta(s, L) {
266
  }
267
  let inflight = 0; const waiters = [];
268
  const MAXQ = 10;
 
269
  async function slot() { if (inflight < MAXQ) { inflight++; return; } await new Promise((r) => waiters.push(r)); inflight++; }
270
  function free() { inflight--; const w = waiters.shift(); if (w) w(); }
271
  async function rangeGet(url, off, len, signal) {
@@ -335,8 +373,12 @@ function disposeVol() {
335
  }
336
  async function loadVolume(s, parent) {
337
  disposeVol();
338
- const L = 5; const m = await zmeta(s, L); const [Z, Y, X] = m.shape; const [cz, cy, cx] = m.chunks;
339
- const stride = Math.max(1, Math.ceil(Z / (COARSE ? 72 : 120)));
 
 
 
 
340
  const zs = []; for (let z = 0; z < Z; z += stride) zs.push(z);
341
  const D = zs.length; const data = new Uint8Array(X * Y * D);
342
  const tex = new THREE.Data3DTexture(data, X, Y, D);
@@ -346,22 +388,27 @@ async function loadVolume(s, parent) {
346
  blending: THREE.AdditiveBlending, uniforms: { uVol: { value: tex }, uCam: { value: new THREE.Vector3() }, uGain: { value: S.gain }, uMode: { value: 0 }, uFill: { value: 1 }, uN: { value: COARSE ? 140 : 220 } },
347
  });
348
  const mesh = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), mat);
349
- mesh.scale.set(mm(s, X * 32), mm(s, zs[D - 1] * 32 + stride * 32), mm(s, Y * 32));
350
  mesh.position.set(0, mesh.scale.y / 2, 0); mesh.renderOrder = 1;
351
  mesh.onBeforeRender = (r, sc, cam) => { mat.uniforms.uCam.value.copy(cam.position).applyMatrix4(new THREE.Matrix4().copy(mesh.matrixWorld).invert()); };
352
  parent.add(mesh);
353
  const abort = new AbortController();
354
- vol = { s, mesh, tex, abort, loaded: 0, total: D, data, zs, X, Y, stride, done: null };
355
  applyVolUniforms();
356
  // coarse to fine: every 4th slice first (copied into its gap), then the rest
357
  const order = []; for (let i = 0; i < D; i += 4) order.push(i); for (let i = 0; i < D; i++) if (i % 4) order.push(i);
358
  const done = new Uint8Array(D); vol.done = done; let lastUp = 0;
359
  const one = async (i) => {
360
  const z = zs[i]; const plane = X * Y; const tasks = [];
361
- for (let by = 0; by * cy < Y; by++) for (let bx = 0; bx * cx < X; bx++) {
362
  tasks.push(rangeGet(`${s.zarr}/${L}/${Math.floor(z / cz)}/${by}/${bx}`, (z % cz) * cy * cx, cy * cx, abort.signal).then((b) => {
363
- if (!b) return; const h = Math.min(cy, Y - by * cy), w = Math.min(cx, X - bx * cx);
364
- for (let r = 0; r < h; r++) data.set(b.subarray(r * cx, r * cx + w), i * plane + (by * cy + r) * X + bx * cx);
 
 
 
 
 
365
  }));
366
  }
367
  await Promise.all(tasks);
@@ -383,7 +430,7 @@ function applyVolUniforms() {
383
  }
384
  function setStatus() {
385
  const el = $('ct-status'); if (!el) return;
386
- el.textContent = vol ? (vol.loaded < vol.total ? `streaming CT ${Math.round(100 * vol.loaded / vol.total)}%` : `CT level 5 (${fmt(vol.s.voxel_um * 32, 0)} µm voxels), ${vol.total} heights`) : '';
387
  }
388
 
389
  // ---------- SCAN view ----------
@@ -392,9 +439,15 @@ let slicePlane = null, sliceTex = null;
392
  let lasGroup = null;
393
  function scanOrigin(s) { return [s.shape[2] / 2, s.shape[1] / 2]; }
394
  function toWorld(s, x, y, z) { const [ox, oy] = scanOrigin(s); return [mm(s, x - ox), mm(s, z), mm(s, y - oy)]; }
 
 
 
 
 
 
395
  function buildScan(s) {
396
  disposeVol(); scanGroup.clear(); lasGroup = null;
397
- for (const l of s.lines) scanGroup.add(tube(linePts(l).map(([x, y, z]) => toWorld(s, x, y, z)), isFinder(l) ? AMBER : ICE, 0.55, l.note.includes('withdrawn') ? 0.5 : 1));
398
  const W = mm(s, s.shape[2]), D = mm(s, s.shape[1]), H = mm(s, s.shape[0]);
399
  const frame = new THREE.LineSegments(new THREE.EdgesGeometry(new THREE.BoxGeometry(W, H, D)), new THREE.LineBasicMaterial({ color: ICE, transparent: true, opacity: 0.12 }));
400
  frame.position.y = H / 2; scanGroup.add(frame);
@@ -493,8 +546,9 @@ function drawCT(sl, alpha = 1) {
493
  function drawMarks(sx, s, z, a = 0) {
494
  const k = sc.width / s.shape[2], c = sc.width / 2, ca = Math.cos(a), sa = Math.sin(a);
495
  for (const l of s.lines) {
 
496
  const p = lineAt(l, z); if (!p) continue;
497
- const u = p[0] * k - c, v = p[1] * k - c; const x = c + u * ca - v * sa, y = c + u * sa + v * ca; const col = isFinder(l) ? '#ffb347' : '#89f0ff';
498
  sx.strokeStyle = col; sx.lineWidth = 1.6; sx.shadowColor = col; sx.shadowBlur = 10;
499
  sx.beginPath(); sx.arc(x, y, 9, 0, Math.PI * 2); sx.stroke();
500
  sx.beginPath(); sx.moveTo(x - 22, y); sx.lineTo(x - 12, y); sx.moveTo(x + 12, y); sx.lineTo(x + 22, y); sx.moveTo(x, y - 22); sx.lineTo(x, y - 12); sx.moveTo(x, y + 12); sx.lineTo(x, y + 22); sx.stroke();
@@ -519,12 +573,15 @@ async function drawSlice() {
519
  present(); $('i-status').textContent = 'model output · villa lasagna';
520
  } else {
521
  $('i-status').textContent = 'streaming…';
522
- const quick = await ctSlice(s, 4, z, sig); if (job !== sliceJob) return;
 
523
  sx.fillStyle = '#000'; sx.fillRect(0, 0, sc.width, sc.height); drawCT(quick); present();
524
- await new Promise((r) => setTimeout(r, 220)); if (job !== sliceJob) return;
525
- const fine = await ctSlice(s, 3, z, sig); if (job !== sliceJob) return;
526
- sx.fillStyle = '#000'; sx.fillRect(0, 0, sc.width, sc.height); drawCT(fine); present();
527
- $('i-status').textContent = `CT level 3 · ${fmt(s.voxel_um * 8, 0)} µm px`;
 
 
528
  }
529
  } catch (e) { if (e.name !== 'AbortError') { $('i-status').textContent = 'CT unavailable'; console.warn(e); } }
530
  }
@@ -542,7 +599,7 @@ function setZ(z, now = false) {
542
  function livePreview(s) {
543
  if (S.mode === 'lasagna') return;
544
  const z = S.z; $('i-z').textContent = `z ${Math.round(z)} · ${fmt(mm(s, z), 1)} mm`;
545
- for (const L of [3, 4]) { const hit = sliceCache.get(`${s.zarr}/${L}/${Math.floor(z / 2 ** L)}`); if (hit) { sx.fillStyle = '#000'; sx.fillRect(0, 0, sc.width, sc.height); drawCT(hit); present(); return; } }
546
  const v = vol && vol.s === s && vol.done ? vol : null; if (!v) return;
547
  const i = Math.max(0, Math.min(v.zs.length - 1, Math.round(z / 32 / v.stride))); if (!v.done[i] && !v.done[i - (i % 4)]) return;
548
  const plane = v.X * v.Y; const sl = { data: v.data.subarray(i * plane, (i + 1) * plane), X: v.X, Y: v.Y };
@@ -551,13 +608,33 @@ function livePreview(s) {
551
  $('z').addEventListener('input', (e) => { if (S.sel) setZ(e.target.value / 1000 * S.sel.shape[0]); });
552
  sc.addEventListener('wheel', (e) => { if (!S.sel) return; e.preventDefault(); const step = S.mode === 'lasagna' ? 1280 * Math.sign(e.deltaY) : S.sel.shape[0] / 200 * Math.sign(e.deltaY); setZ(S.z - step); }, { passive: false });
553
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
554
  // ---------- UI ----------
555
  function railRow(s) {
556
  const li = document.createElement('li'); li.dataset.scroll = s.scroll;
557
- const srcs = s.lines.map((l) => `<span class="src ${isFinder(l) ? 'cf' : ''}" title="${S.data.sources[l.source].label}">${S.data.sources[l.source].short}</span>`).join('');
558
  const g = gradeOf(s);
559
- const prize = s.grand_prize ? 'GP' : 'FL';
560
- li.innerHTML = `<span class="nm">${s.scroll}<small>${prize}</small></span><span class="srcs">${srcs}</span><span class="grade ${g || ''}" title="${(() => { const f = s.lines.find(isFinder); return f ? endsText(f) : ''; })()}">${g || '·'}</span>`;
561
  li.addEventListener('click', () => select(s.scroll, S.mode === 'array' ? 'scan' : S.mode));
562
  li.addEventListener('mouseenter', () => { S.hot = s.scroll; S.dirty = true; });
563
  li.addEventListener('mouseleave', () => { S.hot = null; S.dirty = true; });
@@ -565,20 +642,25 @@ function railRow(s) {
565
  }
566
  function buildRail() {
567
  const ol = $('rail-list'); ol.innerHTML = '';
568
- for (const s of S.data.scrolls) ol.appendChild(railRow(s));
 
 
 
 
569
  }
570
  function buildCard(s) {
571
- $('c-kick').textContent = `SCAN ${s.scan} · ${s.voxel_um} µm · ${s.grand_prize ? 'GRAND PRIZE · ' : ''}FIRST LETTERS`;
572
  $('c-title').textContent = s.scroll;
573
  $('c-lines').innerHTML = s.lines.map((l, i) => {
574
  const src = S.data.sources[l.source]; const f = isFinder(l); const t = statsOf(s, l);
575
  const up = /^https?:/.test(l.upstream) ? `<a href="${l.upstream}" target="_blank" rel="noopener">upstream</a>` : '';
576
- const grade = l.grade ? `<span class="grade ${l.grade}" title="${GRADE_TEXT[l.grade]}">END CHECK ${l.grade}</span>` : `<span class="dim">${l.kind === 'person' ? 'made by a person' : ''}</span>`;
577
  const ends = endsText(l);
578
- const note = f ? `<div class="note">${ends ? `CT end check: ${endsHTML(l)}` : (GRADE_TEXT[l.grade] || '')}. Usable ends: ${usable(l) || 'see note'}. Model output: no end has been checked on CT by a person.</div>`
579
  : (l.note ? `<div class="note">${l.note}.</div>` : '');
580
  const row = (k, v) => `<tr><th>${k}</th><td>${v}</td></tr>`;
581
- return `<div class="ln"><div class="who"><b class="${f ? 'cf' : 'p'}">${src.label}</b>${grade}</div>
 
582
  <div class="meta">${t.points} points · z ${t.z_start} to ${t.z_end} (${fmt(t.height_mm, 0)} mm, ${fmt(t.coverage * 100, 0)}% of the scan) · strays up to ${fmt(t.stray_mm, 1)} mm from its mean · ${l.licence}</div>${note}
583
  <div class="links"><a href="${RAW(l)}" download>download</a><button class="lk" data-copy="${RAW(l)}" data-what="file URL copied">copy URL</button><button class="lk" data-copy="python -m kit centerline get ${s.scroll} --source ${l.source} --into YOUR_PROJECT_FOLDER" data-what="kit command copied: it writes YOUR_PROJECT_FOLDER/umbilicus.json" title="A command for the Scrolls kit that downloads this line, checks its sha256 and writes it as umbilicus.json where VC3D looks">copy kit command</button><a href="${DATASET}/blob/main/${l.file}" target="_blank" rel="noopener">view</a>${up}</div>
584
  <details class="full"><summary>every number</summary><table class="kv">
@@ -621,7 +703,7 @@ function setMode(m) {
621
  $('ctl-array').hidden = m !== 'array'; $('ctl-scan').hidden = m !== 'scan'; $('ctl-las').hidden = m !== 'lasagna';
622
  $('blend-wrap').hidden = m !== 'lasagna'; $('t-ori').parentElement.hidden = m !== 'lasagna';
623
  document.querySelectorAll('#rail li').forEach((li) => li.classList.toggle('sel', !!S.sel && li.dataset.scroll === S.sel.scroll && m !== 'array'));
624
- if (m === 'array') { controls.target.set(0, 90, 0); if (prev !== 'array') { const k = Math.max(1, 1.25 / camera.aspect); camera.position.set(-620 * k, 330 * k, 2350 * k); camera.far = 20000; camera.updateProjectionMatrix(); } controls.autoRotate = false; }
625
  applyVolUniforms(); applyLasVis();
626
  if (m !== 'array' && S.sel) setZ(S.z ?? defaultZ(S.sel), true);
627
  syncURL(); S.dirty = true;
@@ -710,7 +792,7 @@ const COLS = {
710
  ['coverage', 'cover'], ['median_step_vox', 'step'], ['max_step_vox', 'max step'], ['off_center_mm', 'off ctr mm'], ['stray_mm', 'stray mm'], ['tilt_deg', 'tilt °'],
711
  ['wiggle_mm', 'wiggle mm'], ['path_over_height', 'path/ht'], ['stamped', 'stamp'], ['usable_ends', 'usable ends'], ['licence', 'licence'], ['sha256', 'sha256']],
712
  scans: [['scroll', 'scroll'], ['scan', 'scan'], ['voxel_um', 'µm'], ['slices', 'z'], ['height_px', 'y'], ['width_px', 'x'], ['height_mm', 'height mm'], ['width_mm', 'width mm'],
713
- ['levels', 'levels'], ['grand_prize', 'GP'], ['lines', 'lines'], ['sources', 'sources'], ['grade', 'grade'], ['pair_median_mm', 'pair gap mm'], ['pair_max_mm', 'pair max mm']],
714
  };
715
  const DEC = { height_mm: 1, coverage: 2, median_step_vox: 0, max_step_vox: 0, off_center_mm: 2, stray_mm: 2, tilt_deg: 2, wiggle_mm: 3, path_over_height: 4, width_mm: 1, voxel_um: 3, pair_median_mm: 2, pair_max_mm: 2 };
716
  const SHEET = { tab: 'lines', key: null, dir: 1 };
@@ -826,10 +908,12 @@ function syncURL() {
826
  const q = new URLSearchParams();
827
  if (S.mode !== 'array') { q.set('mode', S.mode); q.set('scan', S.sel.scroll); q.set('z', Math.round(S.z)); }
828
  if (S.ex !== 3) q.set('ex', S.ex);
 
829
  history.replaceState(null, '', q.toString() ? `?${q}` : location.pathname);
830
  }
831
  window.umbilici = {
832
  version: () => VERSION,
 
833
  scans: () => S.data.scrolls.map((s) => ({ scroll: s.scroll, scan: s.scan, volume: s.volume, voxel_um: s.voxel_um, shape_zyx: s.shape, grand_prize: s.grand_prize, first_letters: s.first_letters, sources: s.lines.map((l) => l.source), grade: gradeOf(s) })),
834
  lines: (name) => { const s = S.data.scrolls.find((q) => q.scroll === name); return s ? s.lines.map((l) => ({ ...l, points: linePts(l) })) : null; },
835
  at: (name, z) => { const s = S.data.scrolls.find((q) => q.scroll === name); return s ? s.lines.map((l) => ({ source: l.source, xy: lineAt(l, z) })) : null; },
@@ -878,7 +962,9 @@ function tick(now = performance.now()) {
878
  (async () => {
879
  S.data = await getJSON('data/lines.json');
880
  try { S.las = await getJSON('data/lasagna/meta.json'); } catch { S.las = null; document.querySelector('.chip.las').disabled = true; }
881
- $('k-count').textContent = S.data.scrolls.length;
 
 
882
  $('a-sources').innerHTML = Object.entries(S.data.sources).map(([k, v]) => {
883
  const l = S.data.scrolls.flatMap((s) => s.lines).find((q) => q.source === k); const n = S.data.scrolls.filter((s) => s.lines.some((q) => q.source === k)).length;
884
  const names = S.data.scrolls.filter((s) => s.lines.some((q) => q.source === k)).map((s) => s.scroll).join(', ');
@@ -900,6 +986,8 @@ function tick(now = performance.now()) {
900
  }).catch(() => {});
901
  const q = new URLSearchParams(location.search);
902
  if (q.get('ex')) { S.ex = Math.max(1, Math.min(30, +q.get('ex'))); $('ex').value = S.ex; $('ex-v').textContent = S.ex; }
 
 
903
  applySettings(false); buildRail(); buildArray();
904
  $('boot').remove();
905
  tick();
 
1
+ // Umbilici: the center lines of the prize-eligible Herculaneum scans and the other public scans, over live X-ray CT.
2
  // Apache 2.0, Chase Hendrick. CT is read in the visitor's browser from the Vesuvius Challenge open-data bucket.
3
  import * as THREE from 'three';
4
  import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
 
7
  import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
8
  import { OutputPass } from 'three/addons/postprocessing/OutputPass.js';
9
 
10
+ const VERSION = '1.8.0';
11
  const DATASET = 'https://huggingface.co/datasets/SharpMeow/vesuvius-center-lines';
12
  const LASAGNA_SCROLL = 'PHerc0175A';
13
  const ICE = new THREE.Color('#89f0ff');
14
  const AMBER = new THREE.Color('#ffb347');
15
+ // one color per maker, so two people's lines on one scan never share a color (Chase, 24 Oct 2026)
16
+ const SRC_HEX = { bucket: '#89f0ff', drobkov: '#ff7eb6', tauil: '#b69cff', dopico: '#f2f5f7', finder: '#ffb347' };
17
+ const SRC_COL = Object.fromEntries(Object.entries(SRC_HEX).map(([k, v]) => [k, new THREE.Color(v)]));
18
+ const colOf = (l) => SRC_COL[l.source] || ICE;
19
+ const hexOf = (l) => SRC_HEX[l.source] || '#89f0ff';
20
  const COARSE = matchMedia('(pointer: coarse)').matches;
21
+ // the Array view's opening camera: high enough that its three rows (people, Center Finder, not on the prize page) stand apart
22
+ const ARRAY_CAM = [-620, 760, 2300];
23
  const $ = (id) => document.getElementById(id);
24
 
25
  // ---------- state ----------
 
40
  const scene = new THREE.Scene();
41
  scene.background = new THREE.Color('#02060a');
42
  const camera = new THREE.PerspectiveCamera(32, innerWidth / innerHeight, 1, 20000);
43
+ camera.position.set(...ARRAY_CAM).multiplyScalar(Math.max(1, 1.25 / camera.aspect));
44
  const controls = new OrbitControls(camera, canvas);
45
  controls.enableDamping = true;
46
  controls.dampingFactor = 0.08;
 
79
  if (S.mode === 'array' && !userMoved) fitArray();
80
  S.dirty = true;
81
  });
82
+ function fitArray() { const k = Math.max(1, 1.25 / camera.aspect); const a = controls.getAzimuthalAngle(); const r = Math.hypot(ARRAY_CAM[0], ARRAY_CAM[2]) * k;
83
+ camera.position.set(Math.sin(a) * r, ARRAY_CAM[1] * k, Math.cos(a) * r); camera.far = 20000; camera.updateProjectionMatrix(); }
84
 
85
  // ---------- helpers ----------
86
  const mm = (s, v) => v * s.voxel_um / 1000;
 
98
  function lineMean(l) { const p = linePts(l); let x = 0, y = 0; for (const q of p) { x += q[0]; y += q[1]; } return [x / p.length, y / p.length]; }
99
  function drift(s, l) { const [mx, my] = lineMean(l); let d = 0; for (const q of linePts(l)) d = Math.max(d, Math.hypot(q[0] - mx, q[1] - my)); return mm(s, d); }
100
  const isFinder = (l) => l.source === 'finder';
101
+ // lines the visitor switched off: a whole maker (legend) or one line (scan card); kept in the URL as off=
102
+ const OFF = { src: new Set(), line: new Set() };
103
+ const lineKey = (s, l) => `${s.scroll}:${l.source}`;
104
+ const shown = (s, l) => !OFF.src.has(l.source) && !OFF.line.has(lineKey(s, l));
105
  const hasFinder = (s) => s.lines.some(isFinder);
106
  function gradeOf(s) { const f = s.lines.find(isFinder); return f ? f.grade : null; }
107
+ // traffic light for a Center Finder line: red when an end is flagged, yellow (caution) when the check could not judge
108
+ // an end, the scan is one the check was never tuned for, or a pass rests on a CT recap; green when both ends passed
109
+ function lightOf(l) {
110
+ if (!l || !l.grade) return null;
111
+ if (l.grade === 'FLAG') return 'bad';
112
+ const recap = l.ends && Object.values(l.ends).some((e) => e.recapped);
113
+ return l.grade === 'VOID' || l.untested || recap ? 'caution' : 'good';
114
+ }
115
+ const LIGHT_WORD = { good: 'both ends passed the CT end check', caution: 'caution: a CT recap, an end the check could not judge, or a scan the check was not tuned for', bad: 'an end was flagged by the CT end check' };
116
+ const onPrize = (s) => s.first_letters || s.grand_prize;
117
+ function numberWords(n) {
118
+ const ones = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen'];
119
+ const tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty', 'ninety'];
120
+ return n < 20 ? ones[n] : n < 100 ? tens[Math.floor(n / 10)] + (n % 10 ? '-' + ones[n % 10] : '') : String(n);
121
+ }
122
+ // the prize page's word for a scan: GP, FL, both in the card kicker, or none for a scan not on the page
123
+ const prizeTag = (s) => s.grand_prize ? 'GP' : s.first_letters ? 'FL' : '';
124
+ const prizeWords = (s) => !onPrize(s) ? 'NOT ON THE PRIZE PAGE' : [s.grand_prize && 'GRAND PRIZE', s.first_letters && 'FIRST LETTERS'].filter(Boolean).join(' · ');
125
+ // the pyramid level of scan s that stands in for level L of a 1.2 m (about 9 µm) scan: a 2.4 µm scan reads two levels
126
+ // coarser where its pyramid has them; every pyramid here stops at level 5, so its slices are read at level 5
127
+ function lv(s, L) { return Math.min(s.pyramid.length - 1, L + Math.max(0, Math.round(Math.log2(8.64 / s.voxel_um)))); }
128
  function usable(l) {
129
  if (Array.isArray(l.usable)) return l.usable.length ? l.usable.join(', ') : 'none';
130
  const m = /usable ends: ([a-z, ]+)/.exec(l.note || ''); return m ? m[1] : null;
 
140
  FLAG: 'the automatic CT end check flagged an end: there the line sits more than 4 mm from the center the CT shows',
141
  VOID: 'the end check could not judge this line',
142
  };
143
+ const UNTESTED = 'the CT end check was tuned on 1.2 m (about 9 µm) scans only; on this scan its grades are untested, so no end is marked usable';
144
 
145
  // ---------- statistics (definitions: Guide, For researchers) ----------
146
  const RAW = (l) => `${DATASET}/resolve/main/${l.file}`;
 
181
  const t = statsOf(s, l);
182
  return {
183
  scroll: s.scroll, scan: s.scan, volume: s.volume, voxel_um: s.voxel_um, source: l.source, maker: S.data.sources[l.source].label,
184
+ kind: l.kind, grade: l.grade || '', ct_untested: !!l.untested, ct_end_low: endText(l, 'low'), ct_end_high: endText(l, 'high'), usable_ends: isFinder(l) ? (usable(l) || '') : '', withdrawn: l.note.includes('withdrawn'),
185
  ...t, licence: l.licence, sha256: l.sha256, file: RAW(l), upstream: l.upstream, note: l.note,
186
  };
187
  }));
 
245
  const labels = [];
246
  function buildArray() {
247
  arrayGroup.clear(); hitMeshes.length = 0; $('labels').innerHTML = ''; labels.length = 0;
248
+ const prize = S.data.scrolls.filter(onPrize);
249
+ const people = prize.filter((s) => !hasFinder(s));
250
+ const finder = prize.filter(hasFinder);
251
+ const other = S.data.scrolls.filter((s) => !onPrize(s)); // not on the prize page: a row behind the two prize rows
252
+ const rows = [[people, -150], [finder, 170], [other, -560]];
253
  for (const [list, rz] of rows) {
254
  const step = 112, x0 = -(list.length - 1) * step / 2;
255
  list.forEach((s, i) => {
 
257
  const H = mm(s, s.shape[0]);
258
  const [cx, cy] = lineMean(s.lines[0]);
259
  for (const l of s.lines) {
260
+ if (!shown(s, l)) continue;
261
  const pts = linePts(l).map(([x, y, z]) => [mm(s, x - cx) * S.ex, mm(s, z), mm(s, y - cy) * S.ex]);
262
+ g.add(tube(pts, colOf(l), 0.9, l.note.includes('withdrawn') ? 0.45 : 1));
263
  }
264
  const tint = hasFinder(s) ? AMBER : ICE;
265
  g.add(ring(26, 0, tint, 0.28)); g.add(ring(26, H, tint, 0.12));
 
272
  const hit = new THREE.Mesh(new THREE.CylinderGeometry(40, 40, H, 12), new THREE.MeshBasicMaterial({ visible: false }));
273
  hit.position.y = H / 2; hit.userData.scroll = s.scroll; g.add(hit); hitMeshes.push(hit);
274
  arrayGroup.add(g);
275
+ const lt = lightOf(s.lines.find(isFinder));
276
+ const el = document.createElement('div'); el.className = 'lbl' + (hasFinder(s) ? ' cf' : '') + (lt ? ` ${lt}` : '') + (onPrize(s) ? '' : ' np');
277
  el.innerHTML = `<b>${s.scroll.replace('PHerc', '')}</b>${fmt(H, 0)} mm`;
278
  $('labels').appendChild(el); labels.push({ el, g, s });
279
  });
 
303
  }
304
  let inflight = 0; const waiters = [];
305
  const MAXQ = 10;
306
+ const MAX_PX = 640, READS = 2400; // the X-ray volume: widest plane kept, range reads per scan (see loadVolume)
307
  async function slot() { if (inflight < MAXQ) { inflight++; return; } await new Promise((r) => waiters.push(r)); inflight++; }
308
  function free() { inflight--; const w = waiters.shift(); if (w) w(); }
309
  async function rangeGet(url, off, len, signal) {
 
373
  }
374
  async function loadVolume(s, parent) {
375
  disposeVol();
376
+ const L = 5; const m = await zmeta(s, L); const [Z, Y0, X0] = m.shape; const [cz, cy, cx] = m.chunks;
377
+ // A 2.4 µm scan's level-5 plane is up to 1,326 px across (a 1.2 m scan's about 250): it is read whole, kept every
378
+ // f-th pixel, and fewer heights are read (at least 24), so one scan costs at most about READS range reads.
379
+ const f = Math.max(1, Math.ceil(Math.max(X0, Y0) / MAX_PX)); const X = Math.ceil(X0 / f), Y = Math.ceil(Y0 / f);
380
+ const per = Math.ceil(Y0 / cy) * Math.ceil(X0 / cx);
381
+ const stride = Math.max(1, Math.ceil(Z / Math.max(24, Math.min(COARSE ? 72 : 120, Math.floor(READS / per)))));
382
  const zs = []; for (let z = 0; z < Z; z += stride) zs.push(z);
383
  const D = zs.length; const data = new Uint8Array(X * Y * D);
384
  const tex = new THREE.Data3DTexture(data, X, Y, D);
 
388
  blending: THREE.AdditiveBlending, uniforms: { uVol: { value: tex }, uCam: { value: new THREE.Vector3() }, uGain: { value: S.gain }, uMode: { value: 0 }, uFill: { value: 1 }, uN: { value: COARSE ? 140 : 220 } },
389
  });
390
  const mesh = new THREE.Mesh(new THREE.BoxGeometry(1, 1, 1), mat);
391
+ mesh.scale.set(mm(s, X * f * 32), mm(s, zs[D - 1] * 32 + stride * 32), mm(s, Y * f * 32));
392
  mesh.position.set(0, mesh.scale.y / 2, 0); mesh.renderOrder = 1;
393
  mesh.onBeforeRender = (r, sc, cam) => { mat.uniforms.uCam.value.copy(cam.position).applyMatrix4(new THREE.Matrix4().copy(mesh.matrixWorld).invert()); };
394
  parent.add(mesh);
395
  const abort = new AbortController();
396
+ vol = { s, mesh, tex, abort, loaded: 0, total: D, data, zs, X, Y, f, stride, done: null };
397
  applyVolUniforms();
398
  // coarse to fine: every 4th slice first (copied into its gap), then the rest
399
  const order = []; for (let i = 0; i < D; i += 4) order.push(i); for (let i = 0; i < D; i++) if (i % 4) order.push(i);
400
  const done = new Uint8Array(D); vol.done = done; let lastUp = 0;
401
  const one = async (i) => {
402
  const z = zs[i]; const plane = X * Y; const tasks = [];
403
+ for (let by = 0; by * cy < Y0; by++) for (let bx = 0; bx * cx < X0; bx++) {
404
  tasks.push(rangeGet(`${s.zarr}/${L}/${Math.floor(z / cz)}/${by}/${bx}`, (z % cz) * cy * cx, cy * cx, abort.signal).then((b) => {
405
+ if (!b) return; const h = Math.min(cy, Y0 - by * cy), w = Math.min(cx, X0 - bx * cx);
406
+ if (f === 1) { for (let r = 0; r < h; r++) data.set(b.subarray(r * cx, r * cx + w), i * plane + (by * cy + r) * X + bx * cx); return; }
407
+ // keep the pixels whose level-5 row and column are multiples of f
408
+ for (let r = (f - (by * cy) % f) % f; r < h; r += f) {
409
+ const row = i * plane + ((by * cy + r) / f) * X;
410
+ for (let q = (f - (bx * cx) % f) % f; q < w; q += f) data[row + (bx * cx + q) / f] = b[r * cx + q];
411
+ }
412
  }));
413
  }
414
  await Promise.all(tasks);
 
430
  }
431
  function setStatus() {
432
  const el = $('ct-status'); if (!el) return;
433
+ el.textContent = vol ? (vol.loaded < vol.total ? `streaming CT ${Math.round(100 * vol.loaded / vol.total)}%` : `CT level 5${vol.f > 1 ? `, every ${vol.f === 2 ? 'second' : vol.f === 3 ? 'third' : `${vol.f}th`} pixel` : ''} (${fmt(vol.s.voxel_um * 32 * vol.f, 0)} µm voxels), ${vol.total} heights`) : '';
434
  }
435
 
436
  // ---------- SCAN view ----------
 
439
  let lasGroup = null;
440
  function scanOrigin(s) { return [s.shape[2] / 2, s.shape[1] / 2]; }
441
  function toWorld(s, x, y, z) { const [ox, oy] = scanOrigin(s); return [mm(s, x - ox), mm(s, z), mm(s, y - oy)]; }
442
+ const scanLines = new THREE.Group();
443
+ function buildScanLines(s) {
444
+ scanLines.clear();
445
+ for (const l of s.lines) if (shown(s, l)) scanLines.add(tube(linePts(l).map(([x, y, z]) => toWorld(s, x, y, z)), colOf(l), 0.55, l.note.includes('withdrawn') ? 0.5 : 1));
446
+ S.dirty = true;
447
+ }
448
  function buildScan(s) {
449
  disposeVol(); scanGroup.clear(); lasGroup = null;
450
+ scanGroup.add(scanLines); buildScanLines(s);
451
  const W = mm(s, s.shape[2]), D = mm(s, s.shape[1]), H = mm(s, s.shape[0]);
452
  const frame = new THREE.LineSegments(new THREE.EdgesGeometry(new THREE.BoxGeometry(W, H, D)), new THREE.LineBasicMaterial({ color: ICE, transparent: true, opacity: 0.12 }));
453
  frame.position.y = H / 2; scanGroup.add(frame);
 
546
  function drawMarks(sx, s, z, a = 0) {
547
  const k = sc.width / s.shape[2], c = sc.width / 2, ca = Math.cos(a), sa = Math.sin(a);
548
  for (const l of s.lines) {
549
+ if (!shown(s, l)) continue;
550
  const p = lineAt(l, z); if (!p) continue;
551
+ const u = p[0] * k - c, v = p[1] * k - c; const x = c + u * ca - v * sa, y = c + u * sa + v * ca; const col = hexOf(l);
552
  sx.strokeStyle = col; sx.lineWidth = 1.6; sx.shadowColor = col; sx.shadowBlur = 10;
553
  sx.beginPath(); sx.arc(x, y, 9, 0, Math.PI * 2); sx.stroke();
554
  sx.beginPath(); sx.moveTo(x - 22, y); sx.lineTo(x - 12, y); sx.moveTo(x + 12, y); sx.lineTo(x + 22, y); sx.moveTo(x, y - 22); sx.lineTo(x, y - 12); sx.moveTo(x, y + 12); sx.lineTo(x, y + 22); sx.stroke();
 
573
  present(); $('i-status').textContent = 'model output · villa lasagna';
574
  } else {
575
  $('i-status').textContent = 'streaming…';
576
+ const Lq = lv(s, 4), Lf = lv(s, 3);
577
+ const quick = await ctSlice(s, Lq, z, sig); if (job !== sliceJob) return;
578
  sx.fillStyle = '#000'; sx.fillRect(0, 0, sc.width, sc.height); drawCT(quick); present();
579
+ if (Lf !== Lq) {
580
+ await new Promise((r) => setTimeout(r, 220)); if (job !== sliceJob) return;
581
+ const fine = await ctSlice(s, Lf, z, sig); if (job !== sliceJob) return;
582
+ sx.fillStyle = '#000'; sx.fillRect(0, 0, sc.width, sc.height); drawCT(fine); present();
583
+ }
584
+ $('i-status').textContent = `CT level ${Lf} · ${fmt(s.voxel_um * 2 ** Lf, 0)} µm px`;
585
  }
586
  } catch (e) { if (e.name !== 'AbortError') { $('i-status').textContent = 'CT unavailable'; console.warn(e); } }
587
  }
 
599
  function livePreview(s) {
600
  if (S.mode === 'lasagna') return;
601
  const z = S.z; $('i-z').textContent = `z ${Math.round(z)} · ${fmt(mm(s, z), 1)} mm`;
602
+ for (const L of new Set([lv(s, 3), lv(s, 4)])) { const hit = sliceCache.get(`${s.zarr}/${L}/${Math.floor(z / 2 ** L)}`); if (hit) { sx.fillStyle = '#000'; sx.fillRect(0, 0, sc.width, sc.height); drawCT(hit); present(); return; } }
603
  const v = vol && vol.s === s && vol.done ? vol : null; if (!v) return;
604
  const i = Math.max(0, Math.min(v.zs.length - 1, Math.round(z / 32 / v.stride))); if (!v.done[i] && !v.done[i - (i % 4)]) return;
605
  const plane = v.X * v.Y; const sl = { data: v.data.subarray(i * plane, (i + 1) * plane), X: v.X, Y: v.Y };
 
608
  $('z').addEventListener('input', (e) => { if (S.sel) setZ(e.target.value / 1000 * S.sel.shape[0]); });
609
  sc.addEventListener('wheel', (e) => { if (!S.sel) return; e.preventDefault(); const step = S.mode === 'lasagna' ? 1280 * Math.sign(e.deltaY) : S.sel.shape[0] / 200 * Math.sign(e.deltaY); setZ(S.z - step); }, { passive: false });
610
 
611
+ // ---------- showing and hiding lines ----------
612
+ function buildLegend() {
613
+ const used = Object.keys(S.data.sources).filter((k) => S.data.scrolls.some((s) => s.lines.some((l) => l.source === k)));
614
+ $('legend').innerHTML = used.map((k) => `<button class="lg${OFF.src.has(k) ? ' off' : ''}" data-src="${k}" aria-pressed="${!OFF.src.has(k)}" title="show or hide every line by ${S.data.sources[k].label}"><i class="sw" style="background:${SRC_HEX[k]};box-shadow:0 0 6px ${SRC_HEX[k]}"></i>${k === 'finder' ? 'Center Finder (model output)' : S.data.sources[k].label}</button>`).join('');
615
+ }
616
+ function linesChanged() {
617
+ buildLegend(); buildArray(); if (S.sel) { buildScanLines(S.sel); buildCard(S.sel); drawSlice(); }
618
+ syncURLSoon();
619
+ }
620
+ // show(kind, name, on): kind 'source' (a maker, such as drobkov) or 'line' (SCROLL:SOURCE); on omitted toggles
621
+ function showLines(kind, name, on) {
622
+ const set = kind === 'source' ? OFF.src : OFF.line;
623
+ const now = on === undefined ? set.has(name) : !!on;
624
+ if (now) set.delete(name); else set.add(name);
625
+ linesChanged();
626
+ return { off: [...OFF.src, ...OFF.line] };
627
+ }
628
+ document.addEventListener('click', (e) => { const b = e.target.closest('#legend [data-src]'); if (b) showLines('source', b.dataset.src); });
629
+ document.addEventListener('change', (e) => { const c = e.target.closest('input[data-line]'); if (c) showLines('line', c.dataset.line, c.checked); });
630
+
631
  // ---------- UI ----------
632
  function railRow(s) {
633
  const li = document.createElement('li'); li.dataset.scroll = s.scroll;
634
+ const srcs = s.lines.map((l) => `<span class="src s-${l.source}" title="${S.data.sources[l.source].label}">${S.data.sources[l.source].short}</span>`).join('');
635
  const g = gradeOf(s);
636
+ const f = s.lines.find(isFinder); const ut = !!(f && f.untested); const lt = lightOf(f);
637
+ li.innerHTML = `<span class="nm">${s.scroll}<small>${prizeTag(s)}</small></span><span class="srcs">${srcs}</span><span class="grade ${g || ''} ${lt ? 'lt-' + lt : ''}${ut ? ' ut' : ''}" title="${f ? endsText(f) + (ut ? `; ${UNTESTED}` : '') + (lt ? `; ${LIGHT_WORD[lt]}` : '') : ''}">${g || '·'}</span>`;
638
  li.addEventListener('click', () => select(s.scroll, S.mode === 'array' ? 'scan' : S.mode));
639
  li.addEventListener('mouseenter', () => { S.hot = s.scroll; S.dirty = true; });
640
  li.addEventListener('mouseleave', () => { S.hot = null; S.dirty = true; });
 
642
  }
643
  function buildRail() {
644
  const ol = $('rail-list'); ol.innerHTML = '';
645
+ let sep = false;
646
+ for (const s of S.data.scrolls) {
647
+ if (!onPrize(s) && !sep) { sep = true; const li = document.createElement('li'); li.className = 'sep mono'; li.textContent = 'NOT ON THE PRIZE PAGE'; ol.appendChild(li); }
648
+ ol.appendChild(railRow(s));
649
+ }
650
  }
651
  function buildCard(s) {
652
+ $('c-kick').textContent = `SCAN ${s.scan} · ${s.voxel_um} µm · ${prizeWords(s)}`;
653
  $('c-title').textContent = s.scroll;
654
  $('c-lines').innerHTML = s.lines.map((l, i) => {
655
  const src = S.data.sources[l.source]; const f = isFinder(l); const t = statsOf(s, l);
656
  const up = /^https?:/.test(l.upstream) ? `<a href="${l.upstream}" target="_blank" rel="noopener">upstream</a>` : '';
657
+ const grade = l.grade ? `<span class="grade ${l.grade} lt-${lightOf(l)}" title="${GRADE_TEXT[l.grade]}; ${LIGHT_WORD[lightOf(l)]}">END CHECK ${l.grade}${lightOf(l) === 'caution' ? ' · CAUTION' : ''}</span>` : `<span class="dim">${l.kind === 'person' ? 'made by a person' : ''}</span>`;
658
  const ends = endsText(l);
659
+ const note = f ? `<div class="note">${ends ? `CT end check: ${endsHTML(l)}` : (GRADE_TEXT[l.grade] || '')}.${l.untested ? ` Untested: ${UNTESTED}.` : ''} Usable ends: ${usable(l) || 'see note'}. Model output: no end has been checked on CT by a person.</div>`
660
  : (l.note ? `<div class="note">${l.note}.</div>` : '');
661
  const row = (k, v) => `<tr><th>${k}</th><td>${v}</td></tr>`;
662
+ const k = lineKey(s, l);
663
+ return `<div class="ln${shown(s, l) ? '' : ' off'}"><div class="who"><label class="show" title="show or hide this line"><input type="checkbox" data-line="${k}"${OFF.line.has(k) ? '' : ' checked'}${OFF.src.has(l.source) ? ' disabled' : ''}></label><b style="color:${hexOf(l)}">${src.label}</b>${grade}</div>
664
  <div class="meta">${t.points} points · z ${t.z_start} to ${t.z_end} (${fmt(t.height_mm, 0)} mm, ${fmt(t.coverage * 100, 0)}% of the scan) · strays up to ${fmt(t.stray_mm, 1)} mm from its mean · ${l.licence}</div>${note}
665
  <div class="links"><a href="${RAW(l)}" download>download</a><button class="lk" data-copy="${RAW(l)}" data-what="file URL copied">copy URL</button><button class="lk" data-copy="python -m kit centerline get ${s.scroll} --source ${l.source} --into YOUR_PROJECT_FOLDER" data-what="kit command copied: it writes YOUR_PROJECT_FOLDER/umbilicus.json" title="A command for the Scrolls kit that downloads this line, checks its sha256 and writes it as umbilicus.json where VC3D looks">copy kit command</button><a href="${DATASET}/blob/main/${l.file}" target="_blank" rel="noopener">view</a>${up}</div>
666
  <details class="full"><summary>every number</summary><table class="kv">
 
703
  $('ctl-array').hidden = m !== 'array'; $('ctl-scan').hidden = m !== 'scan'; $('ctl-las').hidden = m !== 'lasagna';
704
  $('blend-wrap').hidden = m !== 'lasagna'; $('t-ori').parentElement.hidden = m !== 'lasagna';
705
  document.querySelectorAll('#rail li').forEach((li) => li.classList.toggle('sel', !!S.sel && li.dataset.scroll === S.sel.scroll && m !== 'array'));
706
+ if (m === 'array') { controls.target.set(0, 90, 0); if (prev !== 'array') { const k = Math.max(1, 1.25 / camera.aspect); camera.position.set(ARRAY_CAM[0] * k, ARRAY_CAM[1] * k, ARRAY_CAM[2] * k); camera.far = 20000; camera.updateProjectionMatrix(); } controls.autoRotate = false; }
707
  applyVolUniforms(); applyLasVis();
708
  if (m !== 'array' && S.sel) setZ(S.z ?? defaultZ(S.sel), true);
709
  syncURL(); S.dirty = true;
 
792
  ['coverage', 'cover'], ['median_step_vox', 'step'], ['max_step_vox', 'max step'], ['off_center_mm', 'off ctr mm'], ['stray_mm', 'stray mm'], ['tilt_deg', 'tilt °'],
793
  ['wiggle_mm', 'wiggle mm'], ['path_over_height', 'path/ht'], ['stamped', 'stamp'], ['usable_ends', 'usable ends'], ['licence', 'licence'], ['sha256', 'sha256']],
794
  scans: [['scroll', 'scroll'], ['scan', 'scan'], ['voxel_um', 'µm'], ['slices', 'z'], ['height_px', 'y'], ['width_px', 'x'], ['height_mm', 'height mm'], ['width_mm', 'width mm'],
795
+ ['levels', 'levels'], ['grand_prize', 'GP'], ['first_letters', 'FL'], ['lines', 'lines'], ['sources', 'sources'], ['grade', 'grade'], ['pair_median_mm', 'pair gap mm'], ['pair_max_mm', 'pair max mm']],
796
  };
797
  const DEC = { height_mm: 1, coverage: 2, median_step_vox: 0, max_step_vox: 0, off_center_mm: 2, stray_mm: 2, tilt_deg: 2, wiggle_mm: 3, path_over_height: 4, width_mm: 1, voxel_um: 3, pair_median_mm: 2, pair_max_mm: 2 };
798
  const SHEET = { tab: 'lines', key: null, dir: 1 };
 
908
  const q = new URLSearchParams();
909
  if (S.mode !== 'array') { q.set('mode', S.mode); q.set('scan', S.sel.scroll); q.set('z', Math.round(S.z)); }
910
  if (S.ex !== 3) q.set('ex', S.ex);
911
+ const off = [...OFF.src, ...OFF.line]; if (off.length) q.set('off', off.join(','));
912
  history.replaceState(null, '', q.toString() ? `?${q}` : location.pathname);
913
  }
914
  window.umbilici = {
915
  version: () => VERSION,
916
+ show: (kind, name, on) => showLines(kind, name, on),
917
  scans: () => S.data.scrolls.map((s) => ({ scroll: s.scroll, scan: s.scan, volume: s.volume, voxel_um: s.voxel_um, shape_zyx: s.shape, grand_prize: s.grand_prize, first_letters: s.first_letters, sources: s.lines.map((l) => l.source), grade: gradeOf(s) })),
918
  lines: (name) => { const s = S.data.scrolls.find((q) => q.scroll === name); return s ? s.lines.map((l) => ({ ...l, points: linePts(l) })) : null; },
919
  at: (name, z) => { const s = S.data.scrolls.find((q) => q.scroll === name); return s ? s.lines.map((l) => ({ source: l.source, xy: lineAt(l, z) })) : null; },
 
962
  (async () => {
963
  S.data = await getJSON('data/lines.json');
964
  try { S.las = await getJSON('data/lasagna/meta.json'); } catch { S.las = null; document.querySelector('.chip.las').disabled = true; }
965
+ const nPrize = S.data.scrolls.filter(onPrize).length, nOther = S.data.scrolls.length - nPrize;
966
+ $('k-count').textContent = nPrize; $('k-other').innerHTML = nOther ? `<span class="sep">/</span>${nOther} OTHER PUBLIC SCANS` : '';
967
+ $('h-count').textContent = numberWords(S.data.scrolls.length);
968
  $('a-sources').innerHTML = Object.entries(S.data.sources).map(([k, v]) => {
969
  const l = S.data.scrolls.flatMap((s) => s.lines).find((q) => q.source === k); const n = S.data.scrolls.filter((s) => s.lines.some((q) => q.source === k)).length;
970
  const names = S.data.scrolls.filter((s) => s.lines.some((q) => q.source === k)).map((s) => s.scroll).join(', ');
 
986
  }).catch(() => {});
987
  const q = new URLSearchParams(location.search);
988
  if (q.get('ex')) { S.ex = Math.max(1, Math.min(30, +q.get('ex'))); $('ex').value = S.ex; $('ex-v').textContent = S.ex; }
989
+ for (const k of (q.get('off') || '').split(',').filter(Boolean)) (k.includes(':') ? OFF.line : OFF.src).add(k);
990
+ buildLegend();
991
  applySettings(false); buildRail(); buildArray();
992
  $('boot').remove();
993
  tick();
data/lines.json CHANGED
The diff for this file is too large to render. See raw diff
 
index.html CHANGED
@@ -3,10 +3,10 @@
3
  <head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
- <title>Umbilici · center lines of 22 Herculaneum scrolls</title>
7
- <meta name="description" content="Every public center line (umbilicus) for the 22 prize-eligible Herculaneum scans, in X-ray, with the PHerc0175A lasagna field. Data links, sources and licences included.">
8
- <meta property="og:title" content="Umbilici · center lines of 22 Herculaneum scrolls">
9
- <meta property="og:description" content="Every public center line for the 22 prize-eligible scans, streamed over live X-ray CT, plus the PHerc0175A lasagna field.">
10
  <meta property="og:image" content="https://huggingface.co/spaces/SharpMeow/umbilici/resolve/main/og.jpg">
11
  <meta property="og:image:width" content="1200">
12
  <meta property="og:image:height" content="630">
@@ -32,9 +32,9 @@
32
  <div id="labels" aria-hidden="true"></div>
33
 
34
  <header class="hud tl">
35
- <div class="kicker mono dim">VESUVIUS CHALLENGE<span class="sep">/</span>OPEN DATA<span class="sep">/</span><span id="k-count">22</span> PRIZE SCANS</div>
36
- <h1>The <em>center lines</em> of twenty-two scrolls</h1>
37
- <p class="lede" id="lede">Every public center line (umbilicus) for the scans on the prize page, in one place, drawn over X-ray CT streamed live from the open data. <span class="amber">Amber</span> lines came from Chase Hendrick's Center Finder; <span class="ice">ice</span> lines were made by people.</p>
38
  <div class="hint mono small" id="hint" hidden>
39
  <span>First time here?</span>
40
  <button id="hint-go">Start with the guide</button>
@@ -68,9 +68,7 @@
68
  <aside class="rail" id="rail" aria-label="Scans">
69
  <div class="rail-head mono"><span>SCAN</span><span>SOURCES</span><span>ENDS</span></div>
70
  <ol id="rail-list"></ol>
71
- <div class="legend mono small">
72
- <span><i class="sw ice"></i>person</span><span><i class="sw amber"></i>Center Finder (model output)</span>
73
- </div>
74
  </aside>
75
 
76
  <section class="card" id="card" hidden>
@@ -158,19 +156,22 @@
158
 
159
  <section data-pane="basics">
160
  <p>The Herculaneum scrolls are rolls of papyrus that the eruption of Vesuvius in 79 AD carbonized. They are too fragile to unroll, so the <a href="https://scrollprize.org" target="_blank" rel="noopener">Vesuvius Challenge</a> scans them with X-ray CT, and people and programs trace the wound sheet in 3D to unwrap it virtually. A scroll is wound around a center. The <b>center line</b>, or <b>umbilicus</b>, follows that center from the bottom of the scan to the top. Tracing tools start from it, so a good line for every scan saves everyone time.</p>
161
- <p>This page draws every public center line we know of for the <b id="g-nscan">22</b> scans on the <a href="https://scrollprize.org/prizes" target="_blank" rel="noopener">prize page</a> (the 21 First Letters volumes and PHerc1447, read 23 October 2026): <b id="g-nline">29</b> lines from <b id="g-nsrc">5</b> sources.</p>
162
  <h3>How to look around</h3>
163
  <ol class="steps">
164
- <li><b>Array</b> stands every scan's lines side by side at true height. Drag to orbit, scroll or pinch to zoom, hover for names. One row holds the lines made by people, the other the Center Finder's lines.</li>
165
  <li><b>Click a scan</b> (in the 3D view or the list) to open its <b>X-ray</b>: a radiograph your browser builds from CT it streams from the open data, with the lines inside.</li>
166
  <li>The square at the bottom right is one <b>horizontal slice</b> through the scan. Drag its slider or scroll over it to move up and down. Rings mark where each line crosses that slice; a good line sits in the middle of the innermost turns.</li>
167
  <li><b>Lasagna</b> shows villa's sheet model on PHerc0175A: where it thinks papyrus is, and which way each sheet faces.</li>
168
  <li><b>Data</b> opens every number on this page as tables you can sort and download.</li>
 
169
  </ol>
170
  <h3>Colours and grades</h3>
171
- <p><span class="ice">Ice</span> lines were made by people. <span class="amber">Amber</span> lines are model output from Chase Hendrick's Center Finder, made for the nine 1.2 m scans nobody had traced; no person has checked their ends on CT. An automatic CT end check graded each end of each Center Finder line (release v2.2, 23 Oct 2026). It compares the end with the scroll center the CT itself shows there, estimated from the scan alone (sheet orientations in three slices, never the line), 0, 1 and 2 mm inside the end, with a 4 mm bar. A planted fake tilt is caught at all 18 ends. 14 of the 18 ends pass and 4 are flagged.</p>
 
172
  <ul>
173
  <li><span class="grade PASS">PASS</span> both ends passed.</li>
 
174
  <li><span class="grade FLAG">FLAG</span> one end sits more than 4 mm from the center the CT shows there; the card names which end.</li>
175
  <li><span class="end"><span class="grade PASS">PASS</span><span class="rc">CT recap</span></span> marks a passing end whose last 10 mm was replaced by a straight fit to the CT at heights the check doesn't judge, so the pass says the CT supports that end, not that a separate check confirmed it.</li>
176
  </ul>
@@ -235,8 +236,8 @@
235
  <h3>CT</h3>
236
  <ul>
237
  <li>Read live from <code>vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com</code>, OME-Zarr v2, never stored on this Space. The bucket allows cross-origin range reads.</li>
238
- <li>All <b id="g-nlev">132</b> pyramid levels of the 22 scans (6 each) are <b>uint8</b> in <b>128 x 128 x 128</b> chunks with <b>no compressor</b>, checked when <code>lines.json</code> was built. Level L has voxels 2<sup>L</sup> times the level-0 size. Each scan card's "CT pyramid" lists its shapes.</li>
239
- <li>The page reads one axial plane of a chunk per request (16,384 bytes). Masked chunks outside the scroll are absent and read as empty. The 3D view uses level 5 with a z stride (at most 120 heights, 72 on touch screens; every fourth height first). The slice uses level 4, then level 3, with a 1st to 99.5th percentile window.</li>
240
  </ul>
241
  <h3>Lasagna field, PHerc0175A</h3>
242
  <ul>
 
3
  <head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
+ <title>Umbilici · center lines of 33 Herculaneum scans</title>
7
+ <meta name="description" content="Every public center line (umbilicus) for the 22 prize-eligible Herculaneum scans and 11 other public scans, in X-ray, with the PHerc0175A lasagna field. Data links, sources and licences included.">
8
+ <meta property="og:title" content="Umbilici · center lines of 33 Herculaneum scans">
9
+ <meta property="og:description" content="Every public center line for the 22 prize-eligible scans and 11 others, streamed over live X-ray CT, plus the PHerc0175A lasagna field.">
10
  <meta property="og:image" content="https://huggingface.co/spaces/SharpMeow/umbilici/resolve/main/og.jpg">
11
  <meta property="og:image:width" content="1200">
12
  <meta property="og:image:height" content="630">
 
32
  <div id="labels" aria-hidden="true"></div>
33
 
34
  <header class="hud tl">
35
+ <div class="kicker mono dim">VESUVIUS CHALLENGE<span class="sep">/</span>OPEN DATA<span class="sep">/</span><span id="k-count">22</span> PRIZE SCANS<span id="k-other"></span></div>
36
+ <h1>The <em>center lines</em> of <span id="h-count">thirty-three</span> scans</h1>
37
+ <p class="lede" id="lede">Every public center line (umbilicus) for the scans on the prize page, and for other public scans, in one place, drawn over X-ray CT streamed live from the open data. Each maker has a color (key under the list; click one to hide its lines). <span class="amber">Amber</span> lines came from Chase Hendrick's Center Finder; the rest were made by people. Scan names are green when both Center Finder ends passed the automatic CT end check, yellow for caution, red when an end was flagged.</p>
38
  <div class="hint mono small" id="hint" hidden>
39
  <span>First time here?</span>
40
  <button id="hint-go">Start with the guide</button>
 
68
  <aside class="rail" id="rail" aria-label="Scans">
69
  <div class="rail-head mono"><span>SCAN</span><span>SOURCES</span><span>ENDS</span></div>
70
  <ol id="rail-list"></ol>
71
+ <div class="legend mono small" id="legend" aria-label="Makers: click to show or hide their lines"></div>
 
 
72
  </aside>
73
 
74
  <section class="card" id="card" hidden>
 
156
 
157
  <section data-pane="basics">
158
  <p>The Herculaneum scrolls are rolls of papyrus that the eruption of Vesuvius in 79 AD carbonized. They are too fragile to unroll, so the <a href="https://scrollprize.org" target="_blank" rel="noopener">Vesuvius Challenge</a> scans them with X-ray CT, and people and programs trace the wound sheet in 3D to unwrap it virtually. A scroll is wound around a center. The <b>center line</b>, or <b>umbilicus</b>, follows that center from the bottom of the scan to the top. Tracing tools start from it, so a good line for every scan saves everyone time.</p>
159
+ <p>This page draws every public center line we know of for the 22 scans on the <a href="https://scrollprize.org/prizes" target="_blank" rel="noopener">prize page</a> (the 21 First Letters volumes and PHerc1447, read 23 October 2026) and, since 1.8.0, for 11 other public scans that are not on the prize page (listed last, under NOT ON THE PRIZE PAGE): <b id="g-nscan">33</b> scans, <b id="g-nline">40</b> lines from <b id="g-nsrc">5</b> sources.</p>
160
  <h3>How to look around</h3>
161
  <ol class="steps">
162
+ <li><b>Array</b> stands every scan's lines side by side at true height. Drag to orbit, scroll or pinch to zoom, hover for names. The front rows hold the prize scans (lines made by people behind, the Center Finder's in front); the back row holds the scans not on the prize page.</li>
163
  <li><b>Click a scan</b> (in the 3D view or the list) to open its <b>X-ray</b>: a radiograph your browser builds from CT it streams from the open data, with the lines inside.</li>
164
  <li>The square at the bottom right is one <b>horizontal slice</b> through the scan. Drag its slider or scroll over it to move up and down. Rings mark where each line crosses that slice; a good line sits in the middle of the innermost turns.</li>
165
  <li><b>Lasagna</b> shows villa's sheet model on PHerc0175A: where it thinks papyrus is, and which way each sheet faces.</li>
166
  <li><b>Data</b> opens every number on this page as tables you can sort and download.</li>
167
+ <li><b>Hide a line</b>: click a maker in the key under the list to hide all of its lines, or untick one line on a scan card. The link you copy keeps what you hid.</li>
168
  </ol>
169
  <h3>Colours and grades</h3>
170
+ <p>Each maker has its own color: <span style="color:#89f0ff">Vesuvius Challenge</span>, <span style="color:#ff7eb6">Alexey Drobkov</span>, <span style="color:#b69cff">Abd Elilah</span>, <span style="color:#f2f5f7">Iyan Dopico</span>, all made by people. <span class="amber">Amber</span> lines are model output from Chase Hendrick's Center Finder, made for the nine 1.2 m prize scans nobody had traced and, since 1.8.0, for seven scans not on the prize page; no person has checked their ends on CT. An automatic CT end check graded each end of each Center Finder line (release v2.2, 23 Oct 2026). It compares the end with the scroll center the CT itself shows there, estimated from the scan alone (sheet orientations in three slices, never the line), 0, 1 and 2 mm inside the end, with a 4 mm bar. A planted fake tilt is caught at all 18 ends. 14 of the 18 ends pass and 4 are flagged. The same check on the seven newer lines (24 Oct 2026) passes all 14 ends, 2 after a CT recap, but four of those scans are 2.4 µm scans the check was never tuned on, so their grades are marked untested and no end there is usable.</p>
171
+ <p>Scan names and grades use a traffic light: <span class="grade lt-good">green</span> when both ends passed, <span class="grade lt-caution">yellow</span> for caution (a pass that rests on a CT recap, an end the check could not judge, or an untested scan), <span class="grade lt-bad">red</span> when an end was flagged.</p>
172
  <ul>
173
  <li><span class="grade PASS">PASS</span> both ends passed.</li>
174
+ <li><span class="grade VOID">VOID</span> the planted tilt was not caught at an end, so the check cannot judge it (none here).</li>
175
  <li><span class="grade FLAG">FLAG</span> one end sits more than 4 mm from the center the CT shows there; the card names which end.</li>
176
  <li><span class="end"><span class="grade PASS">PASS</span><span class="rc">CT recap</span></span> marks a passing end whose last 10 mm was replaced by a straight fit to the CT at heights the check doesn't judge, so the pass says the CT supports that end, not that a separate check confirmed it.</li>
177
  </ul>
 
236
  <h3>CT</h3>
237
  <ul>
238
  <li>Read live from <code>vesuvius-challenge-open-data.s3.us-east-1.amazonaws.com</code>, OME-Zarr v2, never stored on this Space. The bucket allows cross-origin range reads.</li>
239
+ <li>All <b id="g-nlev">198</b> pyramid levels of the 33 scans (6 each) are <b>uint8</b> in <b>128 x 128 x 128</b> chunks with <b>no compressor</b>, checked when <code>lines.json</code> was built. Level L has voxels 2<sup>L</sup> times the level-0 size. Each scan card's "CT pyramid" lists its shapes.</li>
240
+ <li>The page reads one axial plane of a chunk per request (16,384 bytes). Masked chunks outside the scroll are absent and read as empty. The 3D view uses level 5 with a z stride (at most 120 heights, 72 on touch screens; every fourth height first). A 2.4 µm scan's level-5 plane is up to 1,326 px across, so it keeps every second or third pixel (at most 640 across) and reads fewer heights (at least 24, about 2,400 range reads a scan). The slice uses level 4, then level 3, with a 1st to 99.5th percentile window; on a 2.4 µm scan it uses level 5 (77 µm pixels, close to a 1.2 m scan's level 3), the coarsest its pyramid has.</li>
241
  </ul>
242
  <h3>Lasagna field, PHerc0175A</h3>
243
  <ul>
style.css CHANGED
@@ -5,7 +5,8 @@
5
  --amber: #ffb347;
6
  --pass: #7dffb2;
7
  --flag: #ff5c72;
8
- --void: #a99cff;
 
9
  --fg: #e3f3f7;
10
  --dim: #6f8a93;
11
  --line: rgba(137, 240, 255, 0.13);
@@ -92,15 +93,30 @@ body.focus .kicker::after { content: ""; }
92
  .src.cf { border-color: rgba(255,179,71,.7); color: var(--amber); }
93
  .grade { font-size: 9px; letter-spacing: .1em; text-align: right; }
94
  .grade.PASS { color: var(--pass); } .grade.FLAG { color: var(--flag); } .grade.VOID { color: var(--void); }
 
 
95
  /* per-end grades: a small coloured pill per end, so a FLAG never reads as the Center Finder's amber */
96
  .end { display: inline-flex; gap: 4px; align-items: baseline; white-space: nowrap; }
97
  .end .grade { text-align: left; font-size: inherit; padding: 0 4px; border: 1px solid currentColor; line-height: 1.5; }
98
- .end .rc { color: var(--dim); font-size: .9em; }
99
  .ends { display: inline-flex; gap: 8px; flex-wrap: wrap; }
100
- .legend { display: flex; gap: 14px; padding: 9px 12px; color: var(--dim); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: rgba(3,12,18,.95); }
101
  .sw { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }
102
  .sw.ice { background: var(--ice); box-shadow: 0 0 6px var(--ice); }
103
  .sw.amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
  /* detail card */
106
  .card { position: fixed; z-index: 6; left: var(--gut); top: calc(var(--gut) + 34px); max-height: calc(100vh - 2 * var(--gut) - 120px); overflow: auto; width: min(380px, calc(100vw - 2 * var(--gut)));
@@ -139,6 +155,8 @@ body.focus .kicker::after { content: ""; }
139
  color: var(--dim); white-space: nowrap; text-align: center; }
140
  .lbl b { display: block; color: var(--fg); font-weight: 400; }
141
  .lbl.cf b { color: var(--amber); }
 
 
142
  .lbl.hot b, .lbl.sel b { color: var(--ice); text-shadow: 0 0 10px rgba(137,240,255,.6); }
143
 
144
  .tip { position: fixed; z-index: 9; pointer-events: none; padding: 6px 9px; border: 1px solid var(--line-strong); background: rgba(2,8,12,.92); max-width: 280px; line-height: 1.5; }
 
5
  --amber: #ffb347;
6
  --pass: #7dffb2;
7
  --flag: #ff5c72;
8
+ --void: #fff04d;
9
+ --caution: #fff04d;
10
  --fg: #e3f3f7;
11
  --dim: #6f8a93;
12
  --line: rgba(137, 240, 255, 0.13);
 
93
  .src.cf { border-color: rgba(255,179,71,.7); color: var(--amber); }
94
  .grade { font-size: 9px; letter-spacing: .1em; text-align: right; }
95
  .grade.PASS { color: var(--pass); } .grade.FLAG { color: var(--flag); } .grade.VOID { color: var(--void); }
96
+ .grade.ut { opacity: .55; text-decoration: underline dotted; }
97
+ .rail li.sep { display: block; color: var(--dim); font-size: 9px; letter-spacing: .12em; padding: 10px 0 4px; cursor: default; pointer-events: none; padding-left: 12px; }
98
  /* per-end grades: a small coloured pill per end, so a FLAG never reads as the Center Finder's amber */
99
  .end { display: inline-flex; gap: 4px; align-items: baseline; white-space: nowrap; }
100
  .end .grade { text-align: left; font-size: inherit; padding: 0 4px; border: 1px solid currentColor; line-height: 1.5; }
101
+ .end .rc { color: var(--caution); font-size: .9em; }
102
  .ends { display: inline-flex; gap: 8px; flex-wrap: wrap; }
103
+ .legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 9px 12px; color: var(--dim); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: rgba(3,12,18,.95); }
104
  .sw { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }
105
  .sw.ice { background: var(--ice); box-shadow: 0 0 6px var(--ice); }
106
  .sw.amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
107
+ .legend .lg { background: none; border: 0; padding: 2px 0; color: var(--dim); font: inherit; cursor: pointer; text-align: left; }
108
+ .legend .lg:hover { color: var(--fg); }
109
+ .legend .lg.off { opacity: .4; text-decoration: line-through; }
110
+ .src.s-bucket { border-color: rgba(137,240,255,.6); color: #89f0ff; }
111
+ .src.s-drobkov { border-color: rgba(255,126,182,.6); color: #ff7eb6; }
112
+ .src.s-tauil { border-color: rgba(182,156,255,.6); color: #b69cff; }
113
+ .src.s-dopico { border-color: rgba(242,245,247,.55); color: #f2f5f7; }
114
+ .src.s-finder { border-color: rgba(255,179,71,.7); color: var(--amber); }
115
+ .grade.lt-good { color: var(--pass); } .grade.lt-caution { color: var(--caution); } .grade.lt-bad { color: var(--flag); }
116
+
117
+ .ln.off { opacity: .45; }
118
+ .who .show { display: inline-flex; margin-right: 6px; vertical-align: middle; }
119
+ .who .show input { accent-color: var(--ice); margin: 0; }
120
 
121
  /* detail card */
122
  .card { position: fixed; z-index: 6; left: var(--gut); top: calc(var(--gut) + 34px); max-height: calc(100vh - 2 * var(--gut) - 120px); overflow: auto; width: min(380px, calc(100vw - 2 * var(--gut)));
 
155
  color: var(--dim); white-space: nowrap; text-align: center; }
156
  .lbl b { display: block; color: var(--fg); font-weight: 400; }
157
  .lbl.cf b { color: var(--amber); }
158
+ .lbl.good b, .lbl.cf.good b { color: var(--pass); } .lbl.caution b, .lbl.cf.caution b { color: var(--caution); } .lbl.bad b, .lbl.cf.bad b { color: var(--flag); }
159
+ .lbl.np { opacity: .7; }
160
  .lbl.hot b, .lbl.sel b { color: var(--ice); text-shadow: 0 0 10px rgba(137,240,255,.6); }
161
 
162
  .tip { position: fixed; z-index: 9; pointer-events: none; padding: 6px 9px; border: 1px solid var(--line-strong); background: rgba(2,8,12,.92); max-width: 280px; line-height: 1.5; }
tools/build_lines.py CHANGED
@@ -2,7 +2,8 @@
2
 
3
  Usage: python3 tools/build_lines.py DATASET_DIR OUT.json
4
  DATASET_DIR is a copy of SharpMeow/vesuvius-center-lines (index.json plus lines/). Only the control points, the
5
- public fields of index.json (with each Center Finder line's per-end CT end check, ct_ends), each file's frame
 
6
  stamp (voxel size, volume name and grid) and its usable_ends are copied; the rest of each file's metadata is not. Scan shapes are read from the
7
  Vesuvius Challenge open-data bucket.
8
  """
@@ -38,7 +39,8 @@ def main(src, out):
38
  if f.get("volume"):
39
  vol_of[f["scan"]] = f["volume"]
40
  scrolls = []
41
- for name, s in sorted(ix["scrolls"].items()):
 
42
  vol = vol_of[s["scan"]]
43
  base = f"{S3}/{name}/volumes/{vol}"
44
  attrs = get_json(f"{base}/.zattrs")
@@ -76,7 +78,7 @@ def main(src, out):
76
  lines.append({
77
  "source": f["source"], "kind": f["kind"], "credit": f["credit"], "licence": f["licence"],
78
  "upstream": f["upstream"], "file": f["file"], "sha256": f["sha256"], "z": f["z"],
79
- "note": f.get("note", ""), "grade": grade, "ends": ends,
80
  "usable": [k for k in ("low", "high") if use.get(k)] if isinstance(use, dict) else None,
81
  "stamp": stamp, "points": flat,
82
  })
 
2
 
3
  Usage: python3 tools/build_lines.py DATASET_DIR OUT.json
4
  DATASET_DIR is a copy of SharpMeow/vesuvius-center-lines (index.json plus lines/). Only the control points, the
5
+ public fields of index.json (with each Center Finder line's per-end CT end check, ct_ends, and ct_untested_scan
6
+ as untested), each file's frame
7
  stamp (voxel size, volume name and grid) and its usable_ends are copied; the rest of each file's metadata is not. Scan shapes are read from the
8
  Vesuvius Challenge open-data bucket.
9
  """
 
39
  if f.get("volume"):
40
  vol_of[f["scan"]] = f["volume"]
41
  scrolls = []
42
+ # the prize page's scans first, then the other public scans (v2.3 and later), each group by name
43
+ for name, s in sorted(ix["scrolls"].items(), key=lambda kv: (not (kv[1]["first_letters"] or kv[1]["grand_prize"]), kv[0])):
44
  vol = vol_of[s["scan"]]
45
  base = f"{S3}/{name}/volumes/{vol}"
46
  attrs = get_json(f"{base}/.zattrs")
 
78
  lines.append({
79
  "source": f["source"], "kind": f["kind"], "credit": f["credit"], "licence": f["licence"],
80
  "upstream": f["upstream"], "file": f["file"], "sha256": f["sha256"], "z": f["z"],
81
+ "note": f.get("note", ""), "grade": grade, "ends": ends, "untested": bool(f.get("ct_untested_scan")),
82
  "usable": [k for k in ("low", "high") if use.get(k)] if isinstance(use, dict) else None,
83
  "stamp": stamp, "points": flat,
84
  })