Shading the surface of the 3D plot

I have the 3D plot here. Is there any way to color or to shade the curve's surface?

b = Table[ParametricPlot3D[{i, y, -y^2 + 2}, {y, -4, 4}], {i, 1, 8}];
Show[b, PlotRange -> {{0, 10}, {-4, 4}, {0, 3}}]


I have try to use FaceForm but it didn't work.

• The code produces eight 2D curves. Is that what you had in mind? If so, do you want each curve to have a separate color, or to shade each of the eight curves with varying color? Nov 23, 2016 at 2:29
• Yes, it creates 8 curves and I want to shade the "space" between the curves so that it looks like a surface.
– ssa
Nov 23, 2016 at 2:35

Perhaps, this is what you had in mind.

ParametricPlot3D[{i, y, -y^2 + 2}, {y, -4, 4}, {i, 1, 8},
ColorFunction -> Function[{x, y, z}, Hue[x]], PlotRange -> {{0, 10}, {-4, 4}, {0, 3}}]


The code in the question instead produces eight 2D curves. With similar coloring, they look like

b = Table[ParametricPlot3D[{i, y, -y^2 + 2}, {y, -4, 4},
PlotStyle -> Hue[(i - 1)/7]], {i, 1, 8}];
Show[b, PlotRange -> {{0, 10}, {-4, 4}, {0, 3}}]


If uniform colors are desired between each curve, then use

a = ParametricPlot3D[{i, y, -y^2 + 2}, {y, -4, 4}, {i, 1, 8},
ColorFunction -> Function[{x, y, z}, Hue[Round[x - 1 - 1/14, 1/7]]],
PlotRange -> {{0, 10}, {-4, 4}, {0, 3}}, Mesh -> None, PlotPoints -> 50];
b = Table[ParametricPlot3D[{i, y, -y^2 + 2}, {y, -4, 4}, PlotStyle -> Black], {i, 1, 8}];
Show[a, b]


• Great! Thank you.
– ssa
Nov 23, 2016 at 2:59

Just to illustrate use of MeshShading. Using Bob Hanlon's function:

f = Hue[Round[(# - 1)/7, 1/7]] &;
ParametricPlot3D[{i, y, -y^2 + 2}, {y, -4, 4}, {i, 1, 8},
PlotRange -> {{0, 10}, {-4, 4}, {0, 3}}, MeshFunctions -> (#1 &),
Mesh -> {Range[2, 7]}, MeshShading -> (f /@ Range[7]),
MeshStyle -> Thickness[0.005], BoundaryStyle -> Thickness[0.005]]