Distribution of Euclidean distance by uniformly distributed $X_{1}, X_{2}, Y_{1}, Y_{2}$

46 Views Asked by At

When $X_{1}, X_{2}, Y_{1}, Y_{2} \sim \text{Unif}(-D,D)$ where $D$ is a constant, I am trying to find the distribution of $Z = \sqrt{(X_{1} - X_{2})^2 + (Y_{1} - Y_{2})^2}$. I sampled in MATLAB to see the histogram (with D=1e3) for $Z$ as

enter image description here

But am struggling with being able to find a closed-form expression for the PDF of $Z$. Can anybody help?