p = (0,0) q = (2,2) 2-D region staircase
flowchart LR A["square pair"] --> B["bisector has a 2-D region"] B --> C["no consistent 1-D curve"] C --> D["merge walk has nothing to follow"] D --> E["wrong or empty diagram"] style A fill:#ff9800 style B fill:#f44336 style C fill:#f44336 style D fill:#c62828 style E fill:#b71c1c
flowchart TD P["square bisector"] --> O1["1. Canonical bisector"] P --> O2["2. Symbolic perturbation"] P --> O3["3. Exact arithmetic + region"] P --> O4["4. Post-process merge"] style P fill:#ff9800 style O1 fill:#2196f3 style O2 fill:#4caf50 style O3 fill:#9c27b0 style O4 fill:#009688
|dx| < |dy| boundary |dx| > |dy| boundary
flowchart LR G["sample grid\n+ site neighbourhoods"] --> N["nearest site\n(L1 distance)"] G --> C["containing cell\npolygon"] N --> A{"same site?"} C --> A A -->|yes| P["β pass"] A -->|no| F["β violation"] style G fill:#4caf50 style N fill:#2196f3 style C fill:#ff9800 style A fill:#9c27b0 style P fill:#009688 style F fill:#f44336
Corpus violations (lower is better) nudge (current) 182 global perturbation 577 minimal SoS 2769 canonical bisector 2769
flowchart TD D["square configuration"] --> P1["findL1Bisector"] D --> P2["isNewBisectorUpward"] D --> P3["determineFirstBorderCross"] D --> P4["trimBisector sort"] D --> P5["bisectorIntersection"] style D fill:#ff9800 style P1 fill:#4caf50 style P2 fill:#f44336 style P3 fill:#f44336 style P4 fill:#f44336 style P5 fill:#f44336
flowchart LR A["182 residual"] --> B["edge-of-canvas\ndegenerate case"] B --> C["underlying merge bugs"] C --> D["bigger win than\nthe square branch"] style A fill:#f44336 style B fill:#ff9800 style C fill:#9c27b0 style D fill:#009688
flowchart LR I["Issue #4\nSoS plan"] --> B["branch dev"] B --> E["experiment\n(negative result)"] E --> R["reverted to clean"] R --> N["next: full SoS\nor residual fix"] style I fill:#4caf50 style B fill:#2196f3 style E fill:#ff9800 style R fill:#9c27b0 style N fill:#009688