Bézier curves/Intersections: Difference between revisions

Content added Content deleted
(→‎{{header|Modula-2}}: Removed the stop after four intersections (it seems inadvisable, given there might be "near-intersections").)
Line 812:
It is possible for points accidentally to be counted twice, for
instance if they lie right on an interval boundary. We will avoid
that by the VERY CRUDEcrude (but perhaps oftenlikely satisfactory) mechanism of requiring
of requiring a minimum max norm between intersections. *)
 
MODULE bezierIntersectionsInModula2;
Line 1,095:
(* Go through the workload, deferring work as necessary. *)
numIntersections := 0;
WHILE (numIntersections <> 4) AND (NOT WorkIsDone (workload)) DO
(* The following code recomputes values of the splines
sometimes. You may wish to store such values in the work pile,