Film a throw with your phone. Get how fast, how steep, how high and how far, with honest error bars.
Try it live → sector-ochre.vercel.app · no signup, nothing uploaded, works in your browser.
When you throw something, it flies in a curve. That curve secretly holds the answer to how hard and how high you threw it, because gravity and air bend every throw in a way that only fits one launch.
SECTOR watches a phone video of a throw, finds the discus (or shot, hammer, javelin) in every frame, traces the curve, and works backwards with physics to say:
| You get | What it means |
|---|---|
| Release speed | how fast it left your hand (m/s) |
| Release angle | how steeply it went up (degrees) |
| Release height | how high up your hand was when you let go |
| Rule 32 distance | the legal distance, measured from the edge of the circle |
| ± error bars | how much each answer could be off. SECTOR shows you instead of pretending |
No sensors. No markers. No second camera. Your video never leaves your phone.
The Studio. Pick a world record, design a throw, or drop in your own video.
|
On a phone. Built mobile-first, because that is where the video is.
|
flowchart LR
A["1 · FILM<br/>one phone, still,<br/>side-on"] --> B["2 · FIND<br/>every speck that moved,<br/>keep the ones that<br/>fall like gravity says"]
B --> C["3 · SOLVE<br/>only one launch<br/>fits that arc:<br/>gravity + air + camera"]
C --> D["4 · REPORT<br/>speed, angle, height,<br/>distance, each with<br/>an honest ± bar"]
style A fill:#0f3d2b,stroke:#c4452a,stroke-width:3px,color:#f4f1e8
style B fill:#0f3d2b,stroke:#c4452a,stroke-width:3px,color:#f4f1e8
style C fill:#0f3d2b,stroke:#c4452a,stroke-width:3px,color:#f4f1e8
style D fill:#0f3d2b,stroke:#c4452a,stroke-width:3px,color:#f4f1e8
- Film it. Prop a phone on the ground, side-on, still. Keep the circle and the whole flight in the picture.
- Find the throw. SECTOR looks for every speck that moved, in every frame. Most are wrong: people, lights, noise. It keeps only the specks that line up on a smooth arc.
- Solve the physics. Gravity pulls, the air pushes back, a discus is a wing. Only one speed, angle and height can draw the arc you filmed.
- Report it, with error bars. Each answer says how far it could be off, so you know what to trust.
The four figures on the site are not mock-ups: they are the tracker's actual output on one rendered throw, computed when the page is built.
frames ─→ median background ─→ blob detection ─→ RANSAC parabola + physics gate
│
4 clicked rim points ─→ homography + camera pose ─────────┤
▼
back-project arc into world
│
aerodynamic flight sim (lift/drag vs α, ρ from altitude+temp)
│
▼
release state + Rule 32 distance
- Detection is deliberately dumb. A discus in flight is a few pixels wide and motion-blurred, so there is no texture for an appearance detector to find. SECTOR subtracts a per-pixel median background (median, not mean, so the thrower is deleted rather than ghosted), accepts dozens of false positives per frame, and lets physics decide.
- The trajectory fit is where the intelligence sits. RANSAC proposes parabolas over every candidate; a gate throws out anything whose vertical acceleration is not gravity. A bird crossing the frame dies on
ay ≈ 0, and there is a regression test for it. - The camera solve takes four points on the ring rim (a known 2.5 m circle) and recovers intrinsics and pose. Reprojection residual is reported live.
- The flight model is RK4 with lift and drag as functions of angle of attack and air density from altitude and temperature. Shot and hammer run ballistic; discus and javelin run aerodynamic.
- Release height is measured, not assumed. Gravity fixes the arc's scale in the image, the camera solve fixes the world's scale, and the height falls out. It is a check on the whole solve, not an input.
- The error bars come from re-solving at ±8% field of view, the least trustworthy input, and reporting the spread.
- A parabola-only tracker is wrong, and quietly. On the world-record reconstruction it reports +8.1 m/s and +39.8 m with a respectable residual. A discus is an airfoil.
| Archive | Published marks (world records, Olympic and World Championships gold) rebuilt from the physics, rendered as video, and re-measured by the tracker |
| Range | Design a release on sliders. The venue renders it; the analyser sees only pixels, never the sliders |
| Your video | Your own clip, decoded in the tab, with the overlay drawn on the real colour frames |
All three go through the same analyze() behind one FrameSource interface. There is no demo code path that could quietly diverge from the real one, which is the only reason the error numbers mean anything.
The tracking overlay is a diagnostic, not decoration: orange = what the tracker saw in pixels, cyan = what it solved in metres, red = what the fit threw out, gold = what a human clicked.
On throws where the answer is known, yes, and the test suite fails if that stops being true. Each row is a synthetic throw: the renderer knows exactly what it threw (terraced stands, floodlights, a thrower, motion blur, decoys, sensor noise), SECTOR sees only pixels, and the table is the gap. npm run accuracy reproduces it, and the site's Evidence section is generated from the same code.
| Case | Truth | Speed err | Angle err | Height err | Distance err | Reproj. |
|---|---|---|---|---|---|---|
| Reference throw | 68.14 m | 0.011 m/s | 0.092° | 0.013 m | 0.039 m | 0.20 px |
| Flat and slow | 41.08 m | 0.040 m/s | 0.071° | 0.012 m | 0.118 m | 0.21 px |
| Fast, steep, 5 m/s headwind | 83.39 m | 0.004 m/s | 0.044° | 0.015 m | 0.000 m | 0.21 px |
Test limits: 0.5 m/s · 1.5° · 0.15 m · 1 m · 2 px. Deliberately loose, so a real regression trips them and numerical drift does not.
Published marks were not produced by this code and cannot be tuned to. For each, SECTOR solves the inverse problem (what release does the model need to reach that distance, with that implement, in that air?), renders that flight, and measures it back. If it needed 40 m/s for 75.56 m, the model would be wrong, and you could see that without owning a frame of video.
| Mark | Implement | Release required | Lift is worth | +8 m/s headwind |
|---|---|---|---|---|
| Alekna 75.56 m | 2.0 kg | 25.33 m/s @ 36° | +11.0 m | +11.1 m |
| Alekna 74.35 m | 2.0 kg | 25.15 m/s @ 36° | +10.7 m | +11.0 m |
| Schult 74.08 m | 2.0 kg | 25.06 m/s @ 36° | +10.8 m | +10.9 m |
| Reinsch 76.80 m | 1.0 kg | 24.95 m/s @ 36° | +14.1 m | +8.7 m |
| Ståhl 70.47 m | 2.0 kg | 24.56 m/s @ 36° | +9.7 m | +10.6 m |
| Allman 69.50 m | 1.0 kg | 23.89 m/s @ 36° | +11.8 m | +9.1 m |
A discus is a wing: into a headwind its lift rises and it flies further, which is why both current world records were thrown in wind at Ramona, Oklahoma. The wind slider moves the venue while holding the release fixed, so you watch it run end to end through the real pipeline.
No broadcast footage is included. It belongs to World Athletics and the IOC. The archive ships marks, sources and physics, never video. For a real measurement, use your own clip.
- Validated against a synthetic renderer, not surveyed real throws. The accuracy table proves the detect → track → calibrate → solve chain is correct end to end. It does not yet prove the renderer matches a real phone camera. Until field validation against taped marks is done, treat real-footage output as a training aid.
- Archive numbers are reconstructions: what physics requires for a published mark, not what any athlete's arm did. Re-measuring them back has its own error, and the Studio shows it next to the answer key.
- Pinhole camera only. No lens-distortion model; wide-angle footage biases the solve near the edges. Rolling shutter is not corrected.
- Static camera, ring rim visible. The background model and the calibration both need it.
- Not an officiating device. It does not replace a steel tape or an official's call.
Video is decoded and analysed entirely in the browser (requestVideoFrameCallback into a canvas, then a Web Worker). Nothing is uploaded and there is no server to upload it to. Most throws footage is of minors at school meets; the safest place for it is the device it was shot on.
npm install
npm run dev # http://localhost:3000Production build, served on port 7311:
npm run build && npx next start -p 7311 # http://localhost:7311npm test # 58 tests in 7 files: engine + accuracy + site data
npm run accuracy # prints the accuracy table above
npm run typecheckLast run on 2026-11-16: 58 of 58 tests passed and npm run typecheck was clean.
No API keys, no environment variables, no backend. The landing page runs the engine once at build time to produce the demo, the figures and the evidence table, so npm run build takes a few extra seconds.
Next.js 16 · React 19 · TypeScript · Tailwind 4 (tokens + a small hand-written stylesheet) · Web Workers · Vitest. Look: a stadium broadcast in daylight (Mondo-red track, white lane lines, infield green, lower-third graphics). Type is Barlow Condensed and JetBrains Mono, self-hosted (SIL OFL licences in src/app/fonts/).
Runtime dependencies: next, react, react-dom. No OpenCV, no TensorFlow, no solver library, no charting library, no animation library. Background subtraction, connected components, RANSAC, homography decomposition, RK4, the aerodynamic fit, the HUD and every chart are written here in plain typed arrays and canvas/SVG calls, so they run identically in a worker, on the main thread, in Node during the build, and under Vitest.
src/lib/
detect.ts background subtraction, thresholding, blob extraction
track.ts RANSAC parabola fitting with the gravity gate
geometry.ts vectors, matrices, homography
solve.ts camera pose, world back-projection, throw metrics, error bars
physics.ts implements, lift/drag, flight integration, air density
aerofit.ts fits release state to the observed arc
casefiles.ts published marks, and the inverse solve that reconstructs them
synth.ts the synthetic venue: ground-truth generator
pipeline.ts one entry point, driven by a FrameSource
result.ts the serialisable result shared by the worker and the page
showcase.ts build-time demo, archive and validation data for the site
video.ts in-browser frame extraction
worker.ts off-main-thread analysis
hud.ts tracking overlay primitives
src/components/
site/ hero demo, how-it-works figures, archive ledger, evidence
Studio.tsx upload / archive / range, progress, results
Stage.tsx Metrics.tsx ProfileChart.tsx PlanView.tsx
Live at sector-ochre.vercel.app. The pipeline is validated end to end on synthetic throws (the table above); validation against real, taped throws has not been done yet, so treat real-footage numbers as a training aid.
- Field validation against surveyed marks, the blocking milestone
- Lens distortion estimation from the ring ellipse
- Rolling-shutter correction
- Multi-throw sessions with release-consistency trends
- Extract
src/libas a standalone zero-dependency package - Hammer wire dynamics (currently a point mass)
- Published marks and their sources: World Athletics, Athletics Weekly, Olympics.com, Guinness World Records and Wikipedia (each linked from
src/lib/casefiles.ts). No broadcast footage is used. - Fonts: Barlow Condensed and JetBrains Mono, under the SIL Open Font License (
src/app/fonts/). - Built with Next.js, React and Vitest.
Built by Akinwale Dare, a discus and hammer thrower at Life University (B.S. Computer Information Systems, March 2027). The reason release height is measured instead of assumed is that I got tired of tools asking me how tall I am.
MIT licensed, © Akinwale Dare.



