You're doing it right. A random normal distribution of coordinates gives you a uniform distribution of directions.
To generate 10000 uniform points on the unit sphere, you run
v = randn(10000,3);
v = bsxfun(@rdivide,v,sqrt(sum(v.^2,2)));
plot3(v(:,1),v(:,2),v(:,3),'.')
axis equal
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…