Bézier curves/Intersections: Difference between revisions
m
→A Phix implementation of the "rectangle-pruned curve-flattening algorithm": Renamed a thing.
(→{{header|Phix}}: A second Phix implementation) |
m (→A Phix implementation of the "rectangle-pruned curve-flattening algorithm": Renamed a thing.) |
||
Line 3,155:
end function
function
-- Return the respective [0,1] parameters of line segments (a0,a1)
-- and (b0,b1), for their intersection point. If there are not two
Line 3,212:
if flat_enough (qportion, tol) then
atom tp, tq
{tp, tq} =
pportion[ENDPT1],
qportion[ENDPT0],
qportion[ENDPT1])
if 0 <= tp then
tp = (1 - tp) * pportion[T0] + tp * pportion[T1]
|