# SphericalPlot3D for a list

This question was asked before (here), but I couldn't get the answers to work. I have a list of values

List1=Table[{theta,phi,f1[theta,phi]},{theta,0,Pi,Pi/10},{phi,0,2Pi,2Pi/10}]
List2=Table[{theta,phi,f2[theta,phi]},{theta,0,Pi,Pi/10},{phi,0,2Pi,2Pi/10}]
f=Table[{List1[[i,j,1]],List1[[i,j,2]],List1[[i,j,3]]^2+List2[[i,j,3]]^2},{i,1,Length[List1]},{j,1,Length[List1[[1]]]}]


Sample functions for f1 and f2:

f1[theta,phi]=Sin[3 theta]Cos[phi];
f2[theta,phi]=Cos[theta] Sin[phi];


How do I get SphericalPlot3D of f from this list? Any help would be appreciated. TIA!

• What are the definitions of f1 and f2? – Bob Hanlon Feb 22 at 15:48
• @BobHanlon They're complicated functions of theta and phi, which is why I didn't want to write them down. I just wanted a general way of getting to the SphericalPlot. – 123infinity Feb 22 at 16:26
• You don't necessarily need to post your actual functions; however, you should include some simple examples. Either one person (you) goes through the effort of making up some functions or everyone who is willing to help you has to do it. – Bob Hanlon Feb 22 at 16:57
• Okay, that makes sense. I'll edit it to include functions. Thanks. – 123infinity Feb 22 at 17:05

Clear["Global*"]

f1[theta_, phi_] = Sin[3 theta] Cos[phi];
f2[theta_, phi_] = Cos[theta] Sin[phi];

List1 = Flatten[
Table[{{theta, phi}, f1[theta, phi]}, {theta, 0, Pi, Pi/10}, {phi,
0, 2 Pi, 2 Pi/10}], 1];

List2 = Flatten[
Table[{{theta, phi}, f2[theta, phi]}, {theta, 0, Pi, Pi/10}, {phi,
0, 2 Pi, 2 Pi/10}], 1];

funcs = Interpolation /@ {List1, List2}


SphericalPlot3D[Evaluate@Through[funcs[theta, phi]],
{theta, 0, Pi}, {phi, 0, 2 Pi},
PlotPoints -> 50,
PlotLegends -> Automatic]
`