Efficient trajectory bending with applications to loop closure | Synapse