I would like to add a smooth fading effect to the end of a curve, while it is animated. Here's a minimal working example which shows a particle moving on a circle (the circle is drawn while the particle is moving around):

circle[t_] := {Sin[Pi t], Cos[Pi t]};
dMax = 1.5;

Animate[
Show[
{ParametricPlot[circle[t], {t, 0 + 0.001, T},
PlotRange -> {{-dMax, dMax}, {-dMax, dMax}},
Frame -> True, Axes -> True, AxesOrigin -> {0, 0}, PlotPoints -> 100],
Graphics@{Black, PointSize -> 0.015, Point[circle[T]]}},
ImageSize -> 500],
{T, 0, 6}, AnimationRate -> 1, AnimationRunning -> False]

1. The end of the trajectory should gently fade away while the particle is moving. Is it possible to do this animation effect with Mathematica (I'm using version 7.0)?

2. Also, I don't understand why I need to add a small delay (0 + 0.001) to the Animate definition. Without that delay, Mathematica gives an error message:

Endpoints for t in {t, 0+0., T} must have distinct machine-precision numerical values.

So how to properly fix this problem without adding an arbitrary delay?

• – Kuba Jan 23 '16 at 16:40
• Kuba, it is not the same. What I'm asking is a fading effect on a part of the path drawn. Not on the particle itself. – Cham Jan 23 '16 at 16:43
• I'm not saying it is although I could argue since the trail after the point is continuous. – Kuba Jan 23 '16 at 16:56
• See the answer below. It is great ! – Cham Jan 23 '16 at 16:56
• There are lot of useful approaches: mathematica.stackexchange.com/q/4847/1997 – ubpdqn Jan 24 '16 at 2:16

ColorFunction and Epilog were around in version 7. However, ColorFunction did get an update in version 9 so I am not certain if this will work in version 7.
Animate[
{u, 0. + $MachineEpsilon, 6}, AnimationRate -> 1, AnimationRunning -> False]  Hope this helps. • Wow, it's working ! Thanks. I'll have to study your answer. – Cham Jan 23 '16 at 16:48 • Why the small delay of 0.001 ? – Cham Jan 23 '16 at 16:49 • My code appears to be working great ! :-) However, I still don't understand the delay of 0.001. Is it really necessary to add such an arbitrary delay to the animate defintion ? – Cham Jan 23 '16 at 16:55 • @Cham It errors if I use 0 or 0. as the start. Might be a bug. – Edmund Jan 23 '16 at 16:56 • @Cham You can use 0. +$MachineEpsilon instead of 0.001. This is the closest your computer can get to zero and a less arbitrary way of preventing ParametricPLot from plotting zero to zero. – Edmund Jan 24 '16 at 11:18