stellui/lib.rs
1//! # stellui
2//!
3//! Stellui is a terminal-based planetarium that renders an all-sky stereographic
4//! projection in a ratatui TUI. The library portion exposes the astronomy math
5//! so that it can be tested and reused independently of the binary.
6//!
7//! ## Coordinate Pipeline
8//!
9//! ```text
10//! catalog Star (J2000 RA/Dec)
11//! → astronomy-engine-bindings: Equator of date → Horizon (alt/az)
12//! → hor_to_stereo: stereographic radius = 2·tan(45° - alt/2), phi = azimuth
13//! → PolarCoordinates::canvas_orient: phi -= 90° (N=bottom, S=top, E=left, W=right)
14//! → CartesianCoordinates::from(polar): x = r·cos(phi), y = r·sin(phi)
15//! → ratatui Canvas with x_bounds/y_bounds = [-2.2, 2.2]
16//! ```
17//!
18//! The horizon sits at `rad == 2.0`. Stars with `rad > 2.0` are below the horizon.
19//!
20//! ## Modules
21//!
22//! - [`astro`] — coordinate math and astronomy engine wrappers
23//! - [`catalog`] — compile-time J2000 star catalog (9 096 stars)
24
25pub mod astro;
26pub mod catalog;
27pub mod dso;