I need to generate a vector sampled uniformly with 10 directions (a collection of 10 random numbers) which lies over a unit sphere. So, the sum of the squares of the 10 valu
There is a math theorem saying that if X = (X1,...,XN)
is a vector with Xi
the standard normal distribution, then X/NORM(X)
is uniform in the unit sphere, where NORM
is the euclidean norm. So you have to sample 10 points from a standard normal distribution (using numpy?) and then normalize the result.