use nalgebra::DVector; pub fn sphere(center_x: f64, center_y: f64, center_z: f64, radius: f64) -> DVector { let center_norm_sq = center_x * center_x + center_y * center_y + center_z * center_z; DVector::from_column_slice(&[ center_x / radius, center_y / radius, center_z / radius, 0.5 / radius, 0.5 * (center_norm_sq / radius - radius) ]) }