I would like to know how to set up an animations which consists of two "sub-animations" side by side or above/below, wherein one animation just shows a real number line from say zero to 2 pi one and the number line is coloured in as we move from zero to one. Simultaneously, the other animation will show the plot of sine(number) where the number is as far as we are on the number line. Hence at the end of the animation the plot of a full period of a sine wave will be shown.


I have no idea where yoiu really want to print the value of the sin curve. However, here is an example:

  %-------------------- write timeline file ---------------------%
  %------------------- assemble animation -----------------------%
    %---- static material: axes, labels, curve ----%
        \psline(!\r\space 0)
      \psdot[opacity=0.4,dotsize=3mm](!\r\space dup exch RadtoDeg sin)
      \psline[linestyle=dashed](!\r\space dup exch RadtoDeg sin)(!\r\space 0)
      \multido{\rA=0+0.174444}{\i}{\rput[lc](!-1.5 \rA\space RadtoDeg sin){\makebox[1cm][l]{\TINY\rA}}}
      \rput[lc](!-1.5 \r\space  RadtoDeg sin){\makebox[1cm][l]{\textcolor{red}{\TINY\r}}}%

View it with the acrobat reader in full screen mode. The animated PDF is available from http://perce.de/pub/animate_sin.pdf

enter image description here

  • Dear Herbert, this example works well in TL2103, but does not work in TL2014 and TL2015; sin curve and axis are not displayed! Do you know why? Jul 8 '15 at 12:11
  • which operating system are you using?
    – user2478
    Jul 9 '15 at 12:22
  • I tested on Win7 32 bit and Win8.1 64 bit Jul 10 '15 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.