Skip to content
  • Will Bainbridge's avatar
    lagrangian: Fixed infinite loops · a4762ea6
    Will Bainbridge authored and Andrew Heather's avatar Andrew Heather committed
    Tracking through an inverted region of the mesh happens in a reversed
    direction relative to a non-inverted region. Usually, this allows the
    tracking to propagate normally, regardless of the sign of the space.
    However, in rare cases, it is possible for a straight trajectory to form
    a closed loop through both positive and negative regions. This causes
    the tracking to loop indefinitely.
    
    To fix this, the displacement through inverted regions has been
    artifically increased by a small amount (1% at the moment). This has the
    effect that the change in track fraction over the negative part of the
    loop no longer exactly cancels the change over the positive part, and
    the track therefore terminates.
    a4762ea6