graph LR P["Point set"] --> C["create_mono"] C --> H["monotone hull"] H --> E["x-first even-index"] E --> K["canonical check"] K --> X["convex cut"] X --> R["rectangle pieces"] style P fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style C fill:#fff9c4,stroke:#f57f17,stroke-width:3px style H fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style E fill:#d1c4e9,stroke:#5e35b1,stroke-width:3px style K fill:#ffe0b2,stroke:#ef6c00,stroke-width:3px style X fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style R fill:#e3f2fd,stroke:#1565c0,stroke-width:3px
graph TD T["create_mono(lst, dir, cmp)"] --> X["dir = (x, y)"] T --> Y["dir = (y, x)"] X --> MX["x-monotone ordering"] Y --> MY["y-monotone ordering"] style T fill:#fff9c4,stroke:#f57f17,stroke-width:3px style X fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style Y fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style MX fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style MY fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px
graph LR A["Polygon with 270ยฐ vertices"] --> B["1. convex cut"] B --> C["convex pieces"] C --> D["2. explicit 270ยฐ"] D --> E["explicit corners resolved"] E --> F["3. implicit 270ยฐ"] F --> G["rectangle pieces"] style A fill:#f8bbd0,stroke:#c2185b,stroke-width:3px style B fill:#fff9c4,stroke:#f57f17,stroke-width:3px style C fill:#c8e6c9,stroke:#2e7d32,stroke-width:3px style D fill:#ffe0b2,stroke:#ef6c00,stroke-width:3px style E fill:#e3f2fd,stroke:#1565c0,stroke-width:3px style F fill:#d1c4e9,stroke:#5e35b1,stroke-width:3px style G fill:#e3f2fd,stroke:#1565c0,stroke-width:3px