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]
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)?
Also, I don't understand why I need to add a small delay
(0 + 0.001)
to theAnimate
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?