# Covering part of previous plot completely with different color

I have:

Show[
ParametricPlot3D[r[t], {t, 0, 2 π},
AxesLabel -> {"x", "y", "z"}] /. Line -> Arrow,
ParametricPlot3D[r[t], {t, 0, π/2},
PlotStyle -> {Red, Thickness[0.02]},
AxesLabel -> {"x", "y", "z"}],
Graphics3D[{
Red, PointSize[Large], Point[{r[0], r[π/2]}],
Text[Style["(1,0,0) at time 0", Black, 12, Background -> White],
r[0], {-1.5, 0}],
Text[Style["(x(t), y(t), z(t)) at time t", Black, 12, Background -> White],
r[π/2], {-1.5, 0}]
}]
]


Which produces this image:

Note that the first curve, drawn in blue, shows through the second curve, drawn in red. I tried increasing the thickness, but that didn't help. I'd like to prevent the blue from shining through. Any suggestions?

Update due to Comment Help:

I'd like to thank everyone for their help on my question. Here is my final proposal.

DynamicModule[{r},
r[t_] = {Cos[t], Sin[t], t};
Manipulate[Show[
ParametricPlot3D[r[t], {t, 0, 2 \[Pi]},
Mesh -> {{t0}}, MeshShading -> {Red, Blue},
MeshStyle -> {Red, PointSize[Large]},
AxesLabel -> {"x", "y", "z"}] /.
g : {___, Blue, ___} :> (g /. Line -> Arrow), Graphics3D[{
{Red, PointSize[Large], Point[r[0]]},
Text[Style["(1,0,0) at time 0", Black, 12, Background -> White],
r[0], {-1.5, 0}],
If[t0 > 0.1,
Text[Style["(x(t), y(t), z(t)) at time t", Black, 12,
Background -> White], r[t0], {-1.5, 0}], {}]
}], ImagePadding -> {{Automatic, 120}, {Automatic, Automatic}}
],
{t0, 0.05, 2. Pi - 0.05}]
]


Which produces this image after I move the point a bit.

However, I am writing large notebooks, each explaining a section of our calculus book, so there might be several Manipulate codings. MichaelE2, you might remember helping to make sure that code in one manipulate doesn't interfere with something in another manipulate (Continuation of a Problem with Manipulate). So, does what I've written above (DynamicModule) seem OK to you?

• You can try making the replacement Line[pts_] :> Tube[pts, 0.08] in the second ParametricPlot3D[]. – J. M.'s discontentment Jun 13 '15 at 6:59
• @Guesswhoitis.I was trying exactly that. But there are some quirks !Mathematica graphics – Dr. belisarius Jun 13 '15 at 7:03

Another way using MeshShading:

Clear[r, t];
r[t_] = {Cos[t], Sin[t], t/2};

Manipulate[
Show[
ParametricPlot3D[r[t], {t, 0, 2 \[Pi]},
Mesh -> {{t0}}, MeshShading -> {Red, Blue},
MeshStyle -> {Red, PointSize[Large]},
AxesLabel -> {"x", "y", "z"}] /.
g : {___, Blue, ___} :> (g /. Line -> Arrow),
Graphics3D[{Text[
Style["(1,0,0) at time 0", Black, 12, Background -> White],
r[0], {-1.5, 0}],
If[t0 > 0.1,
Text[
Style["(x(t), y(t), z(t)) at time t", Black, 12,
Background -> White], r[t0], {-1.5, 0}],
{}]}],
ImagePadding -> {{Automatic, 120}, {Automatic, Automatic}}],
{t0, 0.05, 2. Pi - 0.05}
]


• I learned a lot again from this answer. I've made an update to my original post above with a reminder of your help when using several Manipulates in a single notebook. So, first question is, does it look OK to you? My second question regards PlotStyle -> {{Thick, Arrowheads[0.04], Arrow @@@ {##}} &}. I looked up @@@ and it's Apply, and I looked up ## and it represents the complete sequence of arguments supplied to a pure function, but I tried deleting Arrows @@@ {##} and it made no difference, so I am not quite understanding this part. Again, thanks for marvelous help. – David Jun 13 '15 at 20:06
• @David Oops, I was trying something that works with ParametricPlot, which doesn't seem to work with ParametricPlot3D. I meant to take it out (which I have now done). – Michael E2 Jun 14 '15 at 15:43

Assuming that you have used the parametrization $$r(t)=(\cos{t},\sin{t},t).$$ You could just make the interval over which you plot the blue line shorter, from $[0,2\pi]$ to $[\frac{1}{2}\pi,2\pi]$, so that the plots don't overlap. Then you would get something like this:

Show[
ParametricPlot3D[r[t], {t, π/2, 2 π},
AxesLabel -> {"x", "y", "z"}] /. Line -> Arrow,
ParametricPlot3D[r[t], {t, 0, π/2},
PlotStyle -> {Red, Thick},
AxesLabel -> {"x", "y", "z"}],
Graphics3D[{
Red, PointSize[Large], Point[{r[0], r[π/2]}],
Text[Style["(1,0,0) at time 0", Black, 12, Background -> White],
r[0], {-1.5, 0}],
Text[Style["(1,0,0) at time t", Black, 12, Background -> White],
r[π/2], {-1.5, 0}]}],
PlotRange -> All]


which results in

• Thanks, this is fine for a static image, but I may want to continue and make it a Manipulate demonstration. – David Jun 13 '15 at 15:53
• @David I see. Would something like this be good enough? Manipulate[ Show[ParametricPlot3D[r[t], {t, a, 2 [Pi]}, PlotStyle -> Blue], ParametricPlot3D[r[t], {t, 0, a}, PlotStyle -> Red], PlotRange -> All], {a, Pi/2, 3 Pi/2}] – Pjotr5 Jun 13 '15 at 17:17
• Yep, that would work, thanks for your effort. – David Jun 13 '15 at 18:23