Question: distribute random points on a sphere

i'm working on a short program to put random points on a sphere , but i have some difficulties :
 i consider a sphere  where  i choose  n  points  with  "randpoint" then i plot it but it doesn't work if someone can help me to correct my program

here is the program :

>with(geom3d):
> with(plots):
> s2:=sphere(s3,x^2+y^2+z^2=1):
> sphere1:=(x,y,z,R)->[x+R*cos(phi)*cos(theta),y+R*cos(phi)*sin(theta),z+R*sin(phi)]:
> C1:=plot3d(sphere1(0,0,0,1),phi=-Pi/2..Pi/2,theta=0..2*Pi):
> repartionaléatoire:=proc(n)
> local t,i,Pts,C2;
> t:= array(1..n,[]):
> for i from 1 to n do
> t[i]:= randpoint(t[i],s2);od;
> Pts:= seq(t[i],i=1..n):
> C2:= plots[pointplot3d](Pts,colour=black,symbol=box,symbolsize=4);
> display({C1,C2});
>end proc;

Please Wait...