Module graham_scan

Module graham_scan 

Source
Expand description

Graham scan algorithm implementation for 2D convex hull computation

The Graham scan algorithm computes the convex hull of a set of 2D points by sorting points by polar angle and using a stack-based approach to eliminate concave points.

Functionsยง

compute_graham_scan
Compute convex hull using Graham scan algorithm (2D only)
find_start_point
Find the starting point for Graham scan
is_ccw_turn
Check if three points make a counterclockwise turn
sort_by_polar_angle
Sort points by polar angle from a reference point