In[]:=
(*deployswithcanonicalname*)deploy
Sat 14 Oct 2023 20:58:15
In[]:=
Clear["Global`*"]
In[]:=
b=0.5;pos[theta_]:={b,Cos[theta]Sqrt[1-b^2],Sin[theta]Sqrt[1-b^2]}sphere1=ParametricPlot3D[pos[theta],{theta,0,2Pi},PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}}];sphere2=Graphics3D[{Opacity[.2],Sphere[]}];Show[sphere1,sphere2,PlotLabel->"Valid x"]c=Normalize[{1,1,1}];Plot[c.pos[theta],{theta,0,2Pi},PlotLabel->"value of <c,x>"]cmin=First@Minimize[c.pos[theta],theta];cmax=First@Maximize[c.pos[theta],theta];vals=Table[c.pos[theta],{theta,0,2Pi,.0001}];Histogram[vals,{cmin,cmax,.01},"Probability",AxesOrigin->{0,0}]
Out[]=
Out[]=
Out[]=