I need a way to randomly partition a rectangle into a given amount $N$ of subrectangles in a way that the distribution is as close as possible to uniform for testing purposes. I searched this website and found this post but it's not clear to me how the selected answer picks the next rectangle to push and I'm not sure it can generate any possible random split with a given amount of subrectangles, nor that the probability of the possible splits is uniform.
Are you aware of any algorithm or paper describing techniques that suit my purpose? I deeply appreciate!