find the density of the object