Streamline traversing and merging node moving algorithm