Implements an algorithm for finding joined objects