Selection of the material for the legs of the junction using compositions changing continuously or discontinuously inside the material