Creating random points in the surface of a n-dimensional sphere I have a point X in the surface of an n-dimensional sphere with center 0.
I want to create random points following a distribution with center X, the points must be in the surface of the n-dimensional sphere, and located very close to X.
With spherical coordinates in 3D, I can put some random noise in the two angles defining the point X.
In the general case, I can create random points with a Gaussian in n-dimensions with center X, and project them into the surface of the sphere, by making the euclidean norm of the random points to be equal to the radius of the sphere (this works because the center of the sphere is 0).
Do you have any better ideas about efficiently creating points like these?
 A: *

*This answer uses a slightly different projection than Whuber's answer.


*

I want to create random points following a distribution with center X, the points must be in the surface of the n-dimensional sphere, and located very close to X.

This does not specify the problem in much detail. I will assume that the distribution of the points is spherically symmetric around the point X and that you have some desired distribution for the (Euclidian) distance between the points and X.

You can consider the n-sphere sphere as a sum of (n-1)-spheres, slices/rings/frustrums.
Now we project a point from the n-sphere, onto the n-cylinder around it. Below is a view of the idea in 3 dimensions.

https://en.wikipedia.org/wiki/File:Cylindrical_Projection_basics.svg
The trick is then to sample the height on the cylinder and the direction away from the axis separately.

Without loss of generality we can use the coordinate $(1,0,0,0,...,0)$ (solve it for this case and then rotate the solution to your point $X$).
Then use the following algorithm:

*

*Sample the coordinate $x_1$ by sampling which slices the points end up in according to some desired distance function.

*Sample the coordinates $x_2, ..., x_n$ by determining where the points end up on the (n-1)-spheres (this is like sampling on a (n-1)-dimensional sphere with the regular technique).

Then rotate the solution to the point $X$. The rotations should bring the first coordinate $(1,0,0,0, ..., 0)$ to the vector $X$, the other coordinates should transform to vectors perpendicular to $X$, any orthonormal basis for the perpendicular space will do.
A: First, it is not possible to have the positions be exactly Gaussian since restriction to the surface of a sphere imposes a bound on the range of the coordinates.
You could look at using truncated, to $(-\pi, \pi)$, normals for each component. To be clear, for a 2-sphere (in 3-space) you have fixed the radius, and must choose 2 angles. I am suggesting you put truncated normal distributions on the angles.
A: To specifically address your question, I have a simpler (sillier) alternative:

Why not lift your problem?

Your center $X$ is the projection (normalization) of a vector which has not a normalized norm. You could define a vector $x$ which would serve as your unnormalized center and then select data points around $x$ (typically using a Gaussian distribution).
There is a free parameter: the norm of $x$. As a matter of fact what will matter is the ratio between the standard deviation of $X$ and that norm. You will get a value similar to the $\kappa$ value of the multi-dimensional Von Mises destribution.
