A Contour Tracer’s Stopping Condition: Three Lines Out of Order, Twenty Times the Area
Jacob’s stopping criterion for Moore-neighbourhood tracing requires position and direction to match. I checked before updating the direction, using the previous iteration’s leftover value, so the condition almost never fired — the tracer looped until the iteration cap, and the shoelace formula then closed the unclosed point list straight across the region.
