There are many ways to do this. One is given here: <
Summary: Generate $x_1,\dots,x_4$ using the standard normal distribution (often built-in) and normalize the vector $[x_1,\dots,x_4]$ to have unit length.
There are many ways to do this. One is given here: <
Summary: Generate $x_1,\dots,x_4$ using the standard normal distribution (often built-in) and normalize the vector $[x_1,\dots,x_4]$ to have unit length.