In all honest, except for the simplest of geometric shapes, you’ve got no hope of doing this.
Basically, you need to choose a object A of a specific area as your base, then set density for all other objects based on the equation
density if areaA/areaB, where areaB is the “other object’s” area.
So, as long as you have the area equations for your shapes you should be golden.