Putting trace on point in TikZ

As far as I can see, you could draw the line by dividing it into three cases:

\documentclass[tikz]{standalone}
\begin{document}
    \foreach \n in {0,1,2,...,27}{
    \begin{tikzpicture}
        \useasboundingbox (-2.5,-2.5) rectangle (2.5,2.5);
            \pgfmathsetmacro{\q}{10*\n}
                \draw[densely dotted] (0,-2.5) -- (0,2.5);
                    \draw (0,0) circle(1);
                    \draw (\q:1) -- (0,{2.5*sin(\q)});
                \fill[black,radius=.1] (\q:1) circle;
                \fill[red,radius=.1] (0,{2.5*sin(\q)}) circle; %use 1*sin(·) …
                \draw[ultra thick,red] (0,0) -- (0,{2.5*sin(\q)});
                \ifnum\n>9
                    \draw[ultra thick,red] (0,0) -- (0,2.5);
                \fi
                \ifnum\n>28
                  \draw[ultra thick,red] (0,-2.5) -- (0,2.5);
                \fi
    \end{tikzpicture}
    }
\end{document}

enter image description here


THIS IS REALLY JUST FOR FUN. No competitor to @samcarter's nice answer from which most of this is stolen.

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.footprints}
\begin{document}
\tikzset{cat prints/.style={decorate,decoration={footprints,foot length=2pt,stride
                length=5pt,foot sep=1pt,foot of=felis silvestris},red}}
    \foreach \n in {0,1,2,...,27}{
    \begin{tikzpicture}
        \useasboundingbox (-2.5,-2.5) rectangle (2.5,2.5);
            \pgfmathsetmacro{\q}{10*\n}
                \draw[densely dotted] (0,-2.5) -- (0,2.5);
                    \draw (0,0) circle(1);
                    \draw (\q:1) -- (0,{2.5*sin(\q)});
                \fill[black,radius=.1] (\q:1) circle;
                \fill[red,radius=.1] (0,{2.5*sin(\q)}) circle;
                \ifnum\n<10
                  \draw[cat prints] (0,0) -- (0,{2.5*sin(\q)});
                \else
                  \ifnum\n>9
                      \draw[cat prints] (0,0) -- (0,2.5);
                      \draw[cat prints] (0,2.5cm-0.5pt) -- (0,{2.5*sin(\q)});
                  \fi
                  \ifnum\n>28
                    \draw[cat prints] (0,0) -- (0,2.5);
                    \draw[cat prints] (0,2.5cm-0.5pt) -- (0,-2.5cm+0.5pt);
                    \draw[cat prints] (0,2.5) -- (0,{2.5*sin(\q)});
                  \fi
                \fi
    \end{tikzpicture}
    }
\end{document}

enter image description here

UPDATE: Fading footprints. Plus duck queen. ;-)

\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{decorations.footprints,ducks}
\newsavebox\Duck
\sbox\Duck{\tikz{\duck[crown,laughing, bill=red,longhair=black]}}
\newcounter{MyFootSteps}
\pgfdeclaremetadecoration{fading footprints}{initial}{ \state{initial}[width=0pt, 
next state=footprint] {
    \pgfmathparse{10-3*int(\pgfmetadecoratedpathlength/\pgfmetadecorationsegmentlength)}
    \setcounter{MyFootSteps}{\pgfmathresult}
    \pgfsetlinewidth{0.2pt}
    \pgfset{/pgf/decoration/foot length=\pgfmetadecorationsegmentlength/5,/pgf/decoration/stride
    length=\pgfmetadecorationsegmentlength/3,
    /pgf/decoration/foot sep=1pt,/pgf/decoration/foot of=bird}
  }
\state{footprint}[
switch if less than=\pgfmetadecorationsegmentlength to final, 
width=\pgfmetadecorationsegmentlength/3, next state=footprint] {
\stepcounter{MyFootSteps}
\ifnum\theMyFootSteps>0
\pgfsetfillopacity{0.1*\theMyFootSteps}
\decoration{footprints}
\pgfusepathqfill
\fi
}
\state{final}{\pgfusepathqfill}
}
\begin{document}
\tikzset{fading cat prints/.style={decorate,decoration={fading footprints,meta-segment length=15pt}}}
\foreach \n in {0,1,2,...,35}{
    \begin{tikzpicture}
        \useasboundingbox (-2.5,-2.5) rectangle (2.5,2.5);
            \pgfmathsetmacro{\q}{10*\n}
                \draw[densely dotted] (0,-2.5) -- (0,2.5);
                    \draw (0,0) circle(1);
                    \draw (\q:1) -- (0,{2.5*sin(\q)});
                \fill[black,radius=.1] (\q:1) circle;
                \ifnum\n<10
                  \draw[fading cat prints] (0,-2.5) -- (0,{2.5*sin(\q)});
                \else
                  \ifnum\n>9
                    \ifnum\n<29
                      \draw[fading cat prints] (0,0) -- (0,2.5) -- (0,{2.5*sin(\q)});
                    \else 
                      \draw[fading cat prints] (0,0) -- (0,2.5) -- (0,-2.5) -- (0,{2.5*sin(\q)});
                    \fi
                  \fi
                \fi
                \node[scale=0.5] at (0,{2.5*sin(\q)}) {\usebox\Duck};
    \end{tikzpicture}
}
\end{document}

enter image description here