pub fn analyze_hull(hull: &ConvexHull) -> SpatialResult<HullAnalysis>Expand description
Perform comprehensive analysis of a convex hull
This function computes all major geometric properties of the hull and returns them in a single structure.
§Arguments
hull- The convex hull to analyze
§Returns
- Result containing comprehensive hull analysis
§Examples
use scirs2_spatial::convex_hull::ConvexHull;
use scirs2_spatial::convex_hull::properties::analyze_hull;
use scirs2_core::ndarray::array;
let points = array![[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]];
let hull = ConvexHull::new(&points.view()).unwrap();
let analysis = analyze_hull(&hull).unwrap();
println!("Hull Analysis:");
println!(" Dimensions: {}", analysis.ndim);
println!(" Vertices: {}", analysis.num_vertices);
println!(" Volume: {}", analysis.volume);
println!(" Surface Area: {}", analysis.surface_area);
println!(" Compactness: {:.3}", analysis.compactness);