sfera[u_,v_]:={Cos[u]Cos[v],Sin[u]Cos[v],Sin[v]}

dist[{x0_,y0_,z0_},{a_,b_,c_,d_}]:=Abs[a*x0+b*y0+c*z0+d]/Sqrt[a^2+b^2+c^2]

nuvola=Table[sfera[RandomReal[{0,2Pi}],RandomReal[{0,Pi/2}]],{k,1,10000}];

sel=Select[nuvola,dist[#,{0,1,0,0}]<.1&];

selxz=Map[Drop[#,{2}]&,sel];

Graphics[{Red,PointSize[.03],Point[selxz],Black,Circle[{0,0},1]},Axes->True,ImageSize->200]

Graphics[{Red,PointSize[.03],Point[selxz],Black,Line[selxz]},Axes->True,ImageSize->200]

f=Interpolation[{{0,0},{2,3},{3,5}}];

Plot[f[x],{x,0,3},Epilog->Point[{{0,0},{2,3},{3,5}}]]

lsl={{0,0},{2,3},{3,5}};

f=Interpolation[lsl];

Plot[f[x],{x,0,3},Epilog->Point[lsl]]

lsl=Table[{RandomReal[{0,3}],RandomReal[{0,5}]},{k,1,10}];

f=Interpolation[lsl];

Plot[f[x],{x,0,3},Epilog->Point[lsl]]

nuvola=Table[sfera[RandomReal[{0,2Pi}],RandomReal[{0,Pi/2}]],{k,1,10000}];

sel=Select[nuvola,dist[#,{0,1,0,0}]<.1&];

selxz=Map[Drop[#,{2}]&,sel];

f=Interpolation[selxz];

Plot[f[x],{x,-1,1},Epilog->Point[selxz]]

nuvola=Table[sfera[RandomReal[{0,2Pi}],RandomReal[{0,Pi/2}]],{k,1,10000}];

sel=Select[nuvola,dist[#,{0,1,0,0}]<.02&];

selxz=Map[Drop[#,{2}]&,sel];

f=Interpolation[selxz];

Plot[f[x],{x,-1,1},PlotStyle->{Red,Thickness[.01]},Epilog->{PointSize[.01],Point[selxz]}]

sel=Select[nuvola,dist[#,{0,1,0,0}]<.02&];

selxz=Map[Drop[#,{2}]&,sel];

fitf=Fit[selxz,{1,x},x]

Plot[fitf,{x,-1,1},PlotStyle->{Red,Thickness[.01]},Epilog->{PointSize[.01],Point[selxz]},PlotRange->{{-1,1},{0,1}}]

Plot[Fit[selxz,{1,x,x^2},x]//Evaluate,{x,-1,1},PlotStyle->{Red,Thickness[.01]},Epilog->{PointSize[.01],Point[selxz]},PlotRange->{{-1,1},{0,1}}]

Manipulate[Plot[Fit[selxz,{1,x,x^k},x]//Evaluate,{x,-1,1},PlotStyle->{Red,Thickness[.01]},Epilog->{PointSize[.01],Point[selxz]},PlotRange->{{-1,1},{0,1}}],{k,1,10,1}]

Manipulate[Plot[Fit[selxz,Table[x^k,{k,0,kmax}],x]//Evaluate,{x,-1,1},PlotStyle->{Red,Thickness[.01]},Epilog->{PointSize[.01],Point[selxz]},PlotRange->{{-1,1},{0,1}}],{kmax,1,10,1}]

Fit[selxz,{1,Sqrt[1-x^2]},x]

Plot[Fit[selxz,{1,Sqrt[1-x^2]},x]//Evaluate,{x,-1,1},PlotStyle->{Red,Thickness[.01]},Epilog->{PointSize[.01],Point[selxz]},PlotRange->{{-1,1},{0,1}}]

fitf=Fit[selxz,Table[x^k,{k,0,1}],x]

{x,fitf}

fitf=Fit[selxz,Table[x^k,{k,0,3}],x]

{x,fitf}

eqpar[x_]:={x,fitf}//Evaluate

eqpar[.3]

eqpar[x_]:={x,1.0103774055868315` +0.012097012251964318` x-0.7491223477842578` (x^2)-0.020641442737484868` (x^3)}

Show[{Graphics[Point[selxz]]},ParametricPlot[eqpar[x],{x,-1,1},PlotStyle->Red]]

fitf=Fit[selxz,Table[x^k,{k,0,3}],x]

{x,Fit[selxz,Table[x^k,{k,0,3}],x]}

Show[{Graphics[Point[selxz]]},ParametricPlot[
{x,Fit[selxz,Table[x^k,{k,0,3}],x]}//Evaluate,
{x,-1,1},PlotStyle->Red]]

Manipulate[Show[{Graphics[Point[selxz]]},ParametricPlot[
{x,Fit[selxz,Table[x^k,{k,0,kmax}],x]}//Evaluate,
{x,-1,1},PlotStyle->Red]],{kmax,0,10,1}]

eqpar3d[x_]:={x,0,Fit[selxz,Table[x^k,{k,0,6}],x]}//Evaluate

eqpar3d[.3]

eqpar[x_]:={x,1.0103774055868315` +0.012097012251964318` x-0.7491223477842578` (x^2)-0.020641442737484868` (x^3)}