Put related nodes together by given gravitation between related nodes.