# How do I fill last 'side' of this parametric plot?

I have three curves defined by

ParametricPlot3D[
{
{x*Sin[x], x*Cos[x], -(x/3)},
{Sqrt[y]*x*Sin[x], y^2*x*Cos[x], -(x/3)},
{Sqrt[y]*x*Sin[x], y^2*x*Cos[x], -((x*y^2)/3)}
},
{x, 0, 2*Pi},
{y, 1, 1.15},
PlotStyle -> LightGray, Mesh -> None, PlotPoints -> 100
] As you can see, the region between the curves is filled on two sides, but not on the third, or the triangular end.

How do I complete the fill?

• It seems like you are missing something in the first part? You have just the x variable there, and nothing with y, so that can't give you any 2-dimensional surface. – OnDragi Jun 8 at 20:36
• In your particular case, you can put {Sqrt[1.15] x*Sin[x], 1.15^2 x*Cos[x], -(x/3) y^2} instead of what you have as the first curve. But Michael's answer is more general :) – OnDragi Jun 8 at 20:43

An alternative approach using a single ParametricPlot3D:

ClearAll[f1, f2, f3, f4, f5]
f1[x_, y_] := {x Sin[x], x Cos[x], -(x/3)}

f2[x_, y_] := {Sqrt[y] x Sin[x], y^2 x Cos[x], -(x/3)}

f3[x_, y_] := {Sqrt[y] x Sin[x], y^2 x Cos[x], -((x*y^2)/3)}

f4[r_: {1, 1.15}][x_, y_] := Module[{t = Rescale[y, r]},
t f2[x, r[]] + (1 - t) f3[x, r[]]]

f5[r_: {0, 2 Pi}][x_, y_] := Module[{t = Rescale[x, r]},
t f2[r[], y] + (1 - t) f3[r[], y]]

ParametricPlot3D[{f1[x, y], f2[x, y], f3[x, y], f4[][x, y], f5[][x, y]},
{x, 0, 2 Pi}, {y, 1, 1.15}, PlotStyle -> LightGray, Mesh -> None, PlotPoints -> 50] You need to interpolate between the two bounding curves. One way to do this is to multiply one of the bounding curves by $$t$$, multiply the other by $$(1-t)$$, and create a ParametricPlot running from $$t = 0$$ to 1.

originalplot =
ParametricPlot3D[
{
{x*Sin[x], x*Cos[x], -(x/3)},
{Sqrt[y]*x*Sin[x], y^2*x*Cos[x], -(x/3)},
{Sqrt[y]*x*Sin[x], y^2*x*Cos[x], -((x*y^2)/3)}
},
{x, 0, 2*Pi},
{y, 1, 1.15},
PlotStyle -> LightGray, Mesh -> None, PlotPoints -> 100
]

thirdside =
With[{y = 1.15},
ParametricPlot3D[
t {Sqrt[y] x*Sin[x], y^2*x*Cos[x], -(x/3)}
+ (1 - t) {Sqrt[y]*x*Sin[x], y^2*x*Cos[x], -((x*y^2)/3)},
{x, 0, 2 \[Pi]}, {t, 0, 1},
PlotStyle -> LightGray, Mesh -> None, PlotPoints -> 100]]

Show[originalplot, thirdside] • The missing triangular cap can be plotted & added in the same way, by interpolating between the "point" and the line segment at the end. I'm short on time to code this now, so I'll leave it as an exercise to the reader. :-) – Michael Seifert Jun 8 at 20:39
• Thanks to all - if anyone knows how to put that 'cap' on in specific terms I'd be really grateful - I'm not great with Mathematica, and in this case I'm trying to use it to design a shape for 3D printing... – Richard Burke-Ward Jun 8 at 21:46