Pomax / BezierInfo-2

The development repo for the Primer on Bézier curves, https://pomax.github.io/bezierinfo

Home Page:https://pomax.github.io/bezierinfo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chapter 28 - Curve-line intersections

thehyperevilcorp opened this issue · comments

By selecting control points for quadratic bezier carefully you can see that intersection code doesn't handle border cases properly.

This happens e.g. when you have following setup where p0(180, 0), p1(180, 100) and p2(180, 200), line in y=100:

Screenshot 2021-10-09 at 14 32 56

If you move horizontal line up/down you will discover that there are also other spots where intersection fails.

commented

Yeah, degenerate curve cases definitely need some fixing atm. (You'd think the math worked whether curves were degenerate or not, but no. Zero-deltas make that hilariously not-applicable)