Tests for PLUS impact algorithm (work in progress). Next: pruning search for impact handler.
Replaced ">>" with "> >" to appease Travis. Added BodyWatcher so the camera tracks the brick. Added some test scenarios.
Implemented successive pruning algorithm for impact handler. Improved algorithm for determining a suitable interval step length. Added test scenarios with different coefficients of friction and restitution.
Improved Impacter::calculateIntervalStepLength() to handle sliding direction changes more efficiently (avoids requiring many iterations if converging slowly) and robustly (no longer limits minimum step length, which can be dangerous). Also, unique indices are now required to access Array_ elements (avoids confusing ints used for indexing brick vertices and proximal points).
Displaying total normalized system energy before and after each impact to monitor energy conservation. Added pause before closing visualization windows. Removed MinIntervalsPerPhase parameter, since the interval step length is adequately controlled by other criteria. Other miscellaneous improvements (all global constants now use upper CamelCase, strict adherence to limit of 80 characters per line, etc.).
Fixed bug in calculation of energy dissipated during impact (energy is conserved to within 5.6e-16 across the current set of test scenarios). Reorganized this calculation to avoid storing the velocities at the beginning of the interval. Also checking in clarifying comments and miscellaneous code improvements made during review with Sherm.
calcAbsDiffBetweenAngles() now handles angles that are unknown (NaN). calcSlidingStepLengthToOrigin() no longer returns Q since the calling function doesn't need it. Redesigned calculateIntervalStepLength() to ensure the step size is no smaller than it needs to be; currently isolates step length using secant method, or bisection if secant suggests a step length outside the range [0,1] (which it often does). TODO: Replace secant method with Newton iteration using numerical gradient (as suggested by Sherm).
Rewrote calculateIntervalStepLength(). The search for a transition from sliding to rolling is now handled separately from the search to limit the change in the sliding direction. Tested several iterative strategies; ultimately reinterpreted the requirements geometrically and solved in closed form. The new algorithm is robust, devoid of iteration, and always finds the largest suitable step length.
Merge pull request #100 from tkuchida/PLUSImpact

(WIP) Tests for PLUS impact algorithm