# How do you plot random points in three dimensions?

I've got a function that maps a 2D plane onto a sphere (I'm trying to learn about Geodesics).

f[u_,v_]:={X[u,v],Y[u,v],Z[u,v]};
X[u_,v_]:=Cos[v]Sin[u];
Y[u_,v_]:=Sin[v]Sin[u];
Z[u_,v_]:=Cos[u];


I want to plot this, but the Plot3D gives me only a single value for any given [X,Y] set of coordinates. At the least, I'd like something like a scatter chart (that is, just give it 3 coordinates and have it plot a point), but it would be nice to be able to generate a wire-frame so I could draw my solutions.

Clear["Global*"]

f[u_, v_] := {X[u, v], Y[u, v], Z[u, v]};
X[u_, v_] := Cos[v] Sin[u];
Y[u_, v_] := Sin[v] Sin[u];
Z[u_, v_] := Cos[u];

SeedRandom

data = f @@@ RandomReal[{0, 2 Pi}, {5000, 2}];

Graphics3D[Point[data]] However, you can get a smoother distribution with RandomPoint on a Sphere

SeedRandom

data2 = RandomPoint[Sphere[{0, 0, 0}], 5000];

Graphics3D[Point[data2]] EDIT: Converting the points into a 3-D surface

ListSurfacePlot3D[data2, Axes -> False] • Your first approach is not correct. Pay your attention that the points flock near the poles. – user64494 Dec 17 '19 at 8:01
• @user64494 it's not incorrect — it's just a different distribution. – Ruslan Dec 17 '19 at 10:39
• Great answer. Thank you. For extra points, can you make that into a wire-frame? – Quarkly Dec 17 '19 at 15:22
• @Ruslan: Exactly saying, the points produced by the first code are not uniformly distributed on the sphere so these can't be called random points on the sphere. – user64494 Dec 18 '19 at 8:15
• @user64494 random doesn't imply uniform. – Ruslan Dec 18 '19 at 8:16

Thanks to Bob Hanlon for his answer. Using that as a starting point, I was able to work out this, which is what I was really after:

ParametricPlot3D[{R[u, v]}, {u, 0, Pi}, {v, 0, 2*Pi}]
` 