For the definition of mass, in the case of 2 dimensions
$$ M=\iint_{R}\rho (x,y)dydx $$
is it possible to find the density function $\rho$? If not, is it possible to construct this density function $\rho$ from a piecewise graph? For example, specifically the area enclosed by $0 \leq b-mx \leq b, y \geq 0, x \geq 0$. I know the specific result using a density function of variable x only, using $f(x)=b-mx, g(x)=0$ which is $M=b^2/2m$, i'm just wondering if the result $M$ will be different using a function of x and y instead and how it will be constructed since this approach was never covered in my calculus class.
Maybe a more direct question would be, is it possible to make a density function $\rho(x,y)$ from
$$ \rho=\begin{cases} & 0 \leq b-mx \leq b \\ & x \geq 0 \\ & y \geq 0 \end{cases} $$ ?