pub fn spatial_self_join(points: &[Vec3], r: f64) -> Vec<(usize, usize)>
Spatial self-join: find all pairs (i, j) with i < j within distance r.
r