-Edited for clarity-
My request, specifically and explicitly, is to have the following explained (meaning, how to do what user85109 is suggesting) in plain English, preferably step by step and without MathJax code/formulas. I've spent a couple of days Googling around and trying to work out how to do this, but my coordinate/analytic geometry is so rusty that it's not really coming together.
Please explain:
"generate a single random number that designates the distance along the line connecting the points (0,1) and 1,0). It can be shown that ANY point along the line defined by the equation x+y = 1, in the unit square, is now equally likely to have been chosen."
The following Matlab code was provided as proof (but I've never used Matlab before, so it's not clear to me what is being done):
t = rand(10000000,1); xy = t*[0 1] + (1-t)*[1 0];
Source: https://stackoverflow.com/questions/8064629/random-numbers-that-add-to-100-matlab/8068956#8068956
To be clear, I don't need a method for generating random numbers that sum to a specific total - I just need the above quote explained to me.
Thank you!
The post on stackoverflow is overly complicated. There is now a useful summary at the bottom of the post, which I'll rephrase using your notation:
Generate $X-1$ random numbers in $[0,Y]$ and insert 0 and 100 to produce a list of $X+1$ numbers $(x_i)_{i=0}^X$. Sort the list, and then calculate their successive differences
$$ d_i = x_{i+1} - x_i $$
$\sum d_i$ is clearly $Y$ so meets your needs.
This can be shown (by induction) to generate a uniform distribution on the plane segment $\sum X_i = Y$, where each $X_i \in [0,Y]$. Exercise for the reader!