Find the density of the random variable \(X\) when the pair \( (X,Y) \) is chosen uniformly from the specified region in the plane in each case below.
- The diamond with vertices at \( (0,2), (-2,0), (0,-2), (2,0) \).
- The triangle with vertices \( (-2,0), (1,0), (0,2) \).
[Pitman p 277, #12]