Output: default to PNG with PPM fallback

This commit is contained in:
wyj committed 2026-08-27 04:25:45 -04:00
1 parent 83dc05fd52
commit b0fdf1faca
7 files changed
+47 -26

No files matched your search

+12 -10
View File
@@ -21,8 +21,7 @@ which equalizes their CIE/linear-sRGB luminance under the renderer's blackbody
integration. Longitude boundaries belong to the sector to their east and the
equator to the northern hemisphere, so boundary stars have a deterministic
color.
The output is a binary PPM at `output/imgs/minkowski_sky.ppm`; it can be inspected by
most image viewers or converted to PNG with ImageMagick.
The default output is PNG at `output/imgs/minkowski_sky.png`.
## Movie PNG sequence (Phase A)
@@ -33,7 +32,7 @@ Minkowski benchmark—two coordinate seconds at 30 fps, accelerating from rest
to about `0.95c`—then render its numbered PNG frames:
```sh
make clean && make ENABLE_PNG=1
make clean && make
mkdir -p output/imgs
./build/minkowski_sky --write-minkowski-accel-track output/minkowski_accel_2s.csv \
--duration 2 --fps 30 --proper-acceleration 1.52
@@ -55,15 +54,18 @@ synthetic test catalog uses global default exposure `1e-3`; the accelerated
benchmark explicitly uses `1e-5` because its physical Doppler blue shift
otherwise clips the later frames.
PNG output is optional so the default build has no `libpng` dependency. Build
with `make ENABLE_PNG=1`, then select it with a `.png` output path:
PNG is the default output and the default build links `libpng`:
```sh
make clean && make ENABLE_PNG=1
make clean && make
mkdir -p output/imgs
./build/minkowski_sky --output output/imgs/minkowski_sky.png
```
If `libpng` is unavailable, rebuild with `make clean && make ENABLE_PNG=0`.
That intentionally selects the binary-PPM fallback, whose default path is
`output/imgs/minkowski_sky.ppm`; pass a `.ppm` path for explicit output.
Run the flat-spacetime geodesic regression with:
```sh
@@ -79,7 +81,7 @@ Kerr--Schild coordinates (regular at the horizon), then render the test catalog
to PNG:
```sh
make clean && make SPACETIME=schwarzschild ENABLE_PNG=1
make clean && make SPACETIME=schwarzschild
mkdir -p output/imgs
./build/schwarzschild_sky --catalog assets/sky_grid_5deg.csv \
--width 640 --height 360 --coarse-cell-pixels 8 --fov-deg 60 \
@@ -113,13 +115,13 @@ Useful options:
```sh
./build/minkowski_sky --width 1920 --height 1080 --fov-deg 30 \
--catalog assets/sky_grid_5deg.csv --output output/imgs/frame.ppm
--catalog assets/sky_grid_5deg.csv --output output/imgs/frame.png
./build/minkowski_sky --catalog assets/2mass/processed/2mass_psc_m31_0p5deg_stars.csv \
--look-ra-deg 10.6847083 --look-dec-deg 41.26875 --fov-deg 1.8 \
--exposure 1e15 --output output/imgs/2mass_m31.ppm
--exposure 1e15 --output output/imgs/2mass_m31.png
./build/minkowski_sky --catalog assets/2mass/processed/2mass_psc_m44_1p0deg_stars.csv \
--look-ra-deg 129.99165 --look-dec-deg 19.54139 --fov-deg 2.0 \
--exposure 1e15 --width 1920 --height 1920 --output output/imgs/2mass_m44.ppm
--exposure 1e15 --width 1920 --height 1920 --output output/imgs/2mass_m44.png
./build/minkowski_sky --write-catalog assets/sky_grid_5deg.csv
```