Brane world generation by matter and gravity