Someone finish this line clip engine: https://www.desmos.com/calculator/qnuqsos8o2 Basically it's all working, except for vertical slope problems (I think it was specifically when the polygon's edges are vertical, e.g. with a hexagon). My complete log, for reference: Radial polygon: https://www.desmos.com/calculator/kgsz53gegi Testing (1): https://www.desmos.com/calculator/gpbynczs5s Testing (2): https://www.desmos.com/calculator/jh6lhx67in Branch — polygon clipping (3): https://www.desmos.com/calculator/mulxkn1bkx MASTER: https://www.desmos.com/calculator/2lqzjoaqjw Restrictions + testing: https://www.desmos.com/calculator/exynnhgucz Transformations: https://www.desmos.com/calculator/xwkfups82v Restrictions applied (unfinished): https://www.desmos.com/calculator/ffzefi6oc6 2025: - Restrict points between segment (✓) - Apply shape origin & rotation (✓) - Fix vertical segment slope problem (✓) - Fix vertical edge slope problem (X) MASTER - Fixed slope issues; incorporated X/Y/D transformations https://www.desmos.com/calculator/rpuoq7c0ch (1/17/25) - Restrict final segment between the initial segment points - MASTER - getting cleared (not really): https://www.desmos.com/calculator/ltevsbbwku - Why is it that the restriction of f1 should be on p2? Was it the law of sines inversion? Yes—the triangulation applied to the opposite side - May need to restrict final y Y-restriction is not necessary—x covers it - MASTER with a floor-ceiling edge line system (cleaner): https://www.desmos.com/calculator/3m9tyu5mhl MASTER: https://www.desmos.com/calculator/gvoetxd0p3 - Fixed outside-of-shape bounds, no longer defined by the edge-detections (faulty) - Incorporated y-restriction to fix vertical segment slope issue (x-range is 0) MASTER: removed t0 "is touching" restriction (unneeded) https://www.desmos.com/calculator/dmtvrqtvz3 - Branch: https://www.desmos.com/calculator/8qwnee6g9y - Fixing the slope issue described below MASTER... besides some weird issue with vertical slopes, it's all good: https://www.desmos.com/calculator/qnuqsos8o2 (1/21/25) - Edge detection and is-touching parameters reintroduced—trying to figure out a better workaround - Branch: applying polygon stretch property (work in progress) https://www.desmos.com/calculator/6xrplpntmn (ungrafted) Vertical edge vertical segment issue: https://www.desmos.com/calculator/ym61qq966w - Issues: - Vertical segment intersecting the shape at two vertices returns null (major) - Vertical segment intersecting a vertical edge returns null - Vertical segment inside the shape returns null (major) - So... it's only an issue with vertical slopes, not intersection at nodes... because this pentagon is fine: https://www.desmos.com/calculator/0rrigcrclt - Testing: https://www.desmos.com/calculator/5x974brdzq
I think I fixed the issue. Let me know if there are any bugs: https://www.desmos.com/calculator/j3joc7ky9z (I will clean it up later.) Somewhat cleaner, and nearly fixed: https://www.desmos.com/calculator/irziikhoot