Result of gravity in the formation of the solar system