Purpose. To investigate the technique for constructing a three-dimensional distribution function for the masses of the interior of the Earth and its derivatives, coordinated with the parameters of the planet's gravitational field to fourth order inclusive. By using the mass distribution function constructed, to make an interpretation of the features of the internal structure of an ellipsoidal planet. Methodology. Based on the created initial approximation of the function, which includes a reference density model, further refinements are built.