pub fn find_start_point(points: &ArrayView2<'_, f64>) -> usizeExpand description
Find the starting point for Graham scan
Finds the bottommost point (lowest y-coordinate), and in case of ties, the leftmost point among those with the lowest y-coordinate.
§Arguments
points- Input points array
§Returns
- Index of the starting point
§Examples
use scirs2_spatial::convex_hull::algorithms::graham_scan::find_start_point;
use scirs2_core::ndarray::array;
let points = array![[1.0, 1.0], [0.0, 0.0], [2.0, 0.0], [0.0, 1.0]];
let start_idx = find_start_point(&points.view());
assert_eq!(start_idx, 1); // Point [0.0, 0.0]