Study of the growth mechanism of a self-assembled and ordered multi-dimensional heterojunction at atomic resolution