# Wrong height of vertical lines in a 3D plot

I want stack some vertical lines around a circle. I have used tips on ListPointPlot3D with connected points?

Here is my code

pts = Table[ With[{theta = pipi}, Table[{Cos[theta], Sin [theta], z}, {z, 0, 7, 0.1}]], {pipi, 0, 2 Pi, Pi/6}];

ptsT[k_] := Transpose[{Range[1, Length@pts[[k]]], pts[[k]]}]; func[k_] := Interpolation[ptsT[k]];

ploplo[k_] := With[{func = Interpolation[ptsT[k]]}, ParametricPlot3D[func[\[Tau]], {\[Tau], 1, Length@pts}, ColorFunction -> Function[{x, y, z, t}, ColorData["SouthwestColors"][z]]]]

Show[Table[ploplo[k], {k, 1, Length@pts}], PlotRange -> {{-1, 1}, {-1, 1}, {0, 7}}]

The 3D plot renders the lines shorter, they are supposed to have 7 units and they are way shorter.

The problem is the domain of ParametricPlot3D in ploplo. In your case, Length@pts is 13, not 71 (= Length@ptsT[k]).

You can fix it as, for example:

ploplo[k_] := With[{func = Interpolation[ptsT[k]]},
ParametricPlot3D[
func[\[Tau]],
{\[Tau], 1, Max[func["Domain"]]},
ColorFunction -> Function[{x, y, z, t}, ColorData["SouthwestColors"][z]]
]
]

• That was really useful, love this forum Commented Jun 4, 2021 at 7:30