Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,27 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install ffmpeg (no longer preinstalled on ubuntu-latest runners)
run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends ffmpeg
- name: Stage site (docs + videos + volumes referenced by the site)
run: |
mkdir -p site/videos site/img
cp assets/videos/*.mp4 site/videos/
cp docs/algorithm.html site/ 2>/dev/null || true
cp docs/images/example-run/*.png site/img/
# Committed videos are mp4v (MPEG-4 Part 2, ADR 0004), which Chrome/
# Firefox/Edge refuse to play in <video>. Re-encode to H.264 for the
# site only; the repo's assets/videos/*.mp4 stay mp4v.
ffmpeg -v error -y -i assets/videos/lecturer_example.mp4 \
-c:v libx264 -pix_fmt yuv420p -movflags +faststart \
site/videos/lecturer_example.mp4
ffmpeg -v error -y -i assets/videos/head.mp4 \
-c:v libx264 -pix_fmt yuv420p -movflags +faststart \
site/videos/head.mp4
ffmpeg -v error -y -i assets/videos/onion.mp4 \
-c:v libx264 -pix_fmt yuv420p -movflags +faststart \
site/videos/onion.mp4
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ A plane arrives as 3 or 4 points in a CSV row:

| Points | Geometry | Validity rule (with `EPS = 0.001`) |
|---:|---|---|
| 3 | isosceles triangle `(a, b, c)` | `|dist(a,b) − dist(a,c)| < EPS` |
| 4 | isosceles trapezoid `(a1, a2, b, c)` | `|dist(a1,b) − dist(a2,c)| < EPS`, `dist(a1,a2) ≤ dist(b,c)`, both legs on one plane |
| 3 | isosceles triangle `(a, b, c)` | `\|dist(a,b) − dist(a,c)\| < EPS` |
| 4 | isosceles trapezoid `(a1, a2, b, c)` | `\|dist(a1,b) − dist(a2,c)\| < EPS`, `dist(a1,a2) ≤ dist(b,c)`, both legs on one plane |

An invalid row raises internally and becomes a **black error frame** with a red
banner naming the row and the failing rule; the remaining rows still render, so
Expand Down Expand Up @@ -78,6 +78,8 @@ python Ex0.py assets/nrrd/MRHead_1.nrrd assets/csv/lecturer_example.csv out.mp4
```
row 1: ok (triangle)
row 2: ok (trapezoid)
row 3: |dist(a,b) − dist(a,c)| = 20.5284 ≥ EPS = 0.001 (dist(a,b) = 497.393, dist(a,c) = 476.865)
row 4: |dist(a1,b) − dist(a2,c)| = 100 ≥ EPS = 0.001 (dist(a1,b) = 300, dist(a2,c) = 400)
wrote 4 frames (500x448, mp4v @30 fps) to 'out.mp4' (2 error row(s))
```

Expand Down
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h2>Demo videos</h2>
<!-- ============ quickstart ============ -->
<section id="quickstart">
<h2>Quickstart</h2>
<p class="section-sub">Python ≥ 3.10 (exercised on 3.12). Everything is pip-installable.</p>
<p class="section-sub">Python ≥ 3.12 (numpy 2.5 requires it). Everything is pip-installable.</p>
<pre class="term">
<span class="c"># clone + set up</span>
<span class="p">$</span> git clone https://github.com/ofeq-dev/plane-projection.git
Expand Down
Loading