An approach is presented for solving the inverse gravity problem in the presence of various constraints such as bounds on density. This approach takes into account the nonuniqueness of the solution: for a finite set of measurements, the region studied is divided into a great number of rectangular prisms of unknown density. The set of all solutions of this undetermined problem may be described through various convex diagrams of moments; plots of these moments give bounds on some physical parameters such as the partial and total mass or the position of the center of mass. Numerical solutions are obtained using linear programming algorithms. Also, particular solutions such as the so‐called ideal body may readily be obtained using this technique. Only two‐dimensional cylindrical structures are considered, but application of this technique to three‐dimensional bodies is straight‐forward.