Generate value of $\Bbb R^n$ in convex shape with given distribution I have a question, partly from computer science but mostly from math, I guess.
Denote $S$ to be a convex shape of $\Bbb R^n$ which is obtained by truncating predefined $n$-dimensional cube with (finite number of) hyperplanes (planes of dimension $n-1$). Another words, each hyperplane is defined by inequality $\lambda_1x_1 + \ldots + \lambda_nx_n + c \le 0$ that trims cube, where $\lambda_1, \ldots, \lambda_n, c \in \Bbb R$ - constants.
More than that, let us have a value distribution for each axis, i.e. $\forall i = \overline{1,n} \;\; F_i: \Bbb R \rightarrow [0, 1]$.
The question is: how to efficiently generate a random tuple $(x_1, \ldots, x_n)$ from convex shape $S$ with given axis distributions $F_i$? (Programmatically, with certain accuracy of floating point.)
Perhaps some parts of this question are classical objectives from the science, but I don't rather know where to start searching and solving this one. Sure to be open to any ideas.
Edit: it is nice to get the answer at least for the case of even distribution.
 A: I got an idea, but I don't know whether it really works.


*

*Simplexize cube into $n$-simplexes.

*Iteratively by each hyperplane cut all simplexes with it. If any simplex divides, then trimmed shape is either simplex or shape that can be split into simplexes.

*Assume we (somehow) have a probability measure function $\mu: S \supseteq X \rightarrow [0, 1]$ and we know (somehow) how to calculate probability measure of any simplex.

*Given resulted set of simplexes, firstly we calculate measure for every simplex.

*Chose a simplex from the set by the given probability distribution as discrete distribution on the set of simplexes.

*Given selected simplex, we can take any vertex and iteratively by its adjacent $n$ simplex edges make the following:
$\qquad$ a) Chose edge from remaining set;
$\qquad$ b) Create a function $f: x \mapsto [0, 1]$ which calculates measure of simplex dimension $n-i$ $(i=\overline{1,n})$, where $x$ is a fixed point of the current selected edge (i.e. we reduces to the case of simplex with dimension less by one, fixing a point of one edge);
$\qquad$ c) Chose a point on the edge by the given probability function $f$, then go to the case (a).

*When iterations in (7) complete, we have $n$ values which are related to coordinates, but in system of simplex edges. Translating the system into standard coordinate system gives us required random point.


This method (if correct and I didn't miss anything) is pretty nice and with preprocessing metadata allows to generate tuples in time $O(k(n)n)$, where $O(k(n))$ is time for calculating measure of a simplex of dimension $n$. But the Achilles' heels are:  


*

*I don't even know how to calculate probability measure for simplexes;  

*The very large number of simplexes, not mention the increasing after splitting with hyperplanes. It influences on preprocessing time and memory, think cases started from $n\ge10$ are too rough.


What do you think about this method? May be any better ideas?
