# Fill a sphere above an arbitrary curve

I have a function which generates a curve on the surface of a unit sphere, parameterised by the azimuthal angle. How can I plot a sphere with two different colour above and below this curve?

f[t_] := Normalize[0.3 {Cos[t/2]^2, Cos[3 t] + Sin[t/2], 0} + {Cos[t], Sin[t], 0.3}];
Show[{
Graphics3D[{Opacity[0.8], Sphere[]}],
ParametricPlot3D[f[t], {t, 0, 2 Pi}]
}]


So a crude way is to add a second parameter which will guide surface towards e.g. the pole

Show[
ParametricPlot3D[
Normalize[a f[t] + (1 - a) {0, 0, 1}], {t, 0, 2 Pi}, {a, 0, 1}
],
ParametricPlot3D[f[t], {t, 0, 2 Pi}, PlotStyle -> Thick],
Graphics3D@Sphere[{0, 0, 0}, .99]
, PlotRange -> All
]


Show[
ParametricPlot3D[
Normalize[a f[t] + (1 - a) {0, 0, 1}], {t, 0, 2 Pi}, {a, 0, 1},
Mesh -> None, PlotStyle -> Red],
ParametricPlot3D[
Normalize[a f[t] + (1 - a) {0, 0, -1}], {t, 0, 2 Pi}, {a, 0, 1},
Mesh -> None, PlotStyle -> Blue]
, PlotRange -> All
]


• Very clever! ${}$ Aug 18, 2017 at 11:12