# Why is ParametricPlot3D not producing a graph

I have the vector V = {2, y z^2, 3 y + z}

I wanted to get a 3d parametric plot of V using: x[t] = Sin[t^2]; y[t] = t^2 - Cos[t]; z[t] = Sinh[t] - Cos[t]. So I did:

ParametricPlot3D[{2 x, y z^2, 3 y + z}, {t, 0, 2 Pi}, PlotStyle -> Thick, AxesLabel -> {"x", "y", "z"}]


I am unsure what to take for the fx argument inside ParametricPlot3d as x=2 inside V. I decided to go for what I did as shown above. And I do not get a graph at all.

• use Evaluate@{2 x[t], y[t] z[t]^2, 3 y[t] + z[t]} instead of {2 x, y z^2, 3 y + z}?
– kglr
Commented Aug 30, 2020 at 13:49
• As ParametricPlot3D[ { fx, fy, fz},{u,umin,umax} ] takes this general form, can you tell me if by taking 2x for fx I did the right thing? Or should I have left it as 2 inside ParametricPlot3D? I also used Evaluate inside PP3D but plot is still empty. Commented Aug 30, 2020 at 13:54
• Block[{x = Sin[t^2], y = t^2 - Cos[t], z = Sinh[t] - Cos[t], V = {2 x, y z^2, 3 y + z}}, ParametricPlot3D[V, {t, 0, 2 Pi}, PlotStyle -> Thick, AxesLabel -> {"x", "y", "z"}]] Commented Aug 30, 2020 at 13:58
• Btw one thing I am confused about is if the x-variable is a constant like 2 here inside V where V = {2, y z^2, 3 y + z} then does it affect ParametricPlot3D or do i have to always parameterize any constant for plotting in this regard? Commented Aug 30, 2020 at 14:30

Since your function V[t] uses x[t],y[t],z[t] (okay x is not used but anyways) I would define them first using this code:

x[t_] = Sin[t^2];
y[t_] = t^2 - Cos[t];
z[t_] = Sinh[t] - Cos[t];


Now you can define V[t] itself

V[t_] = {2, y[t]*z[t]^2, 3*y[t] + z[t]};


We can now use ParametricPlot3D :

ParametricPlot3D[
V[t],
{t, 0, 2 Pi},
PlotStyle -> Thick,
AxesLabel -> {"x", "y", "z"},
PlotRange -> {{-Pi, Pi}, {-Pi, Pi}, {-Pi, Pi}}
]


Now you will get plot which looks quite awkward because Mathematica chooses the plotRange on its own so I added PlotRange to make a more pleasing looking plot:

You might need to adjust the values in the PlotRange to your desire.

• Yes, it worked, was my plot command then not working because I did not define the functions? That's the difference I am seeing. Another thing I want to ask is that if I want to calculate the divergence of this vector V[t] then would Div[V[t], {x[t], y[t], z[t]}] work although this just returns me the divergence*V - not any actual expression or value. Is it possible or should the original V expression V = {2, y z^2, 3 y + z} be only evaluated for divergence? Commented Aug 30, 2020 at 16:46
Clear["Global*"]

x[t] = Sin[t^2]; y[t] = t^2 - Cos[t]; z[t] = Sinh[t] - Cos[t];


The functions must include their arguments and since the functions are literally only defined for the symbol t you must Evaluate them prior to t being assigned any numeric values.

ParametricPlot3D[Evaluate@{2 x[t], y[t] z[t]^2, 3 y[t] + z[t]},
{t, 0, 2 Pi},
PlotStyle -> Thick,
AxesLabel -> {"x", "y", "z"},
BoxRatios -> {1, 1, 1}]


The usual way to define functions is with a pattern as the argument

Clear["Global*"]

x[t_] = Sin[t^2]; y[t_] = t^2 - Cos[t]; z[t_] = Sinh[t] - Cos[t];


In this case the Evaluate is not needed.

ParametricPlot3D[
{2 x[t], y[t] z[t]^2, 3 y[t] + z[t]}, {t, 0, 2 Pi},
PlotStyle -> Thick,
AxesLabel -> {"x", "y", "z"},
BoxRatios -> {1, 1, 1}]


< same image >