2

Can I use beamer to display animations created by GeoGebra? GeoGebra can export Graphics to PGF/TikZ.

\documentclass[10pt]{article}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\begin{document}
\definecolor{qqqqff}{rgb}{0.,0.,1.}
\definecolor{ffqqqq}{rgb}{1.,0.,0.}
\definecolor{uuuuuu}{rgb}{0.26666666666666666,0.26666666666666666,0.26666666666666666}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->,color=black] (-1.097777777777778,0.) -- (6.4044444444444455,0.);
\foreach \x in {-1.,-0.5,0.5,1.,1.5,2.,2.5,3.,3.5,4.,4.5,5.,5.5,6.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0.,-2.0044444444444456) -- (0.,2.1555555555555586);
\foreach \y in {-2.,-1.5,-1.,-0.5,0.5,1.,1.5,2.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-1.097777777777778,-2.0044444444444456) rectangle (6.4044444444444455,2.1555555555555586);
\draw [line width=2.pt] (0.,0.) circle (1.cm);
\draw [domain=-0.00:6.2918,color=ffqqqq] plot(\x,{sin(\x*360/6.2918)});
\draw [line width=1.2pt,dash pattern=on 2pt off 2pt,color=qqqqff] (0.9427546655283462,0.3334870921408144)-- (0.34,0.3334870921408144);
\begin{scriptsize}
\draw [fill=uuuuuu] (0.9427546655283462,0.3334870921408144) circle (1.5pt);
\draw[color=uuuuuu] (1.0088888888888892,0.4577777777777792) node {$P$};
\draw [fill=uuuuuu] (0.34,0.3334870921408144) circle (1.5pt);
\draw[color=uuuuuu] (0.40444444444444455,0.4577777777777792) node {$Q$};
\end{scriptsize}
\end{tikzpicture}
\end{document}
13
  • Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Oct 7 '16 at 16:09
  • I can't because I don't know how to start.
    – timbrophy
    Oct 8 '16 at 12:18
  • How about creating a simple animation in GeoGebra and show us what the exported tikz file looks like? Oct 8 '16 at 12:47
  • This is a still from such an animation:
    – timbrophy
    Oct 9 '16 at 19:20
  • Sorry. I was trying to add the code and ran out of time. When I try to add the code here I am told that I have too many characters. How can I add it?
    – timbrophy
    Oct 9 '16 at 19:38
1

The following text is summarized from http://texwelt.de/wissen/fragen/7875/kann-ich-eine-interaktive-geogebra-datei-in-ein-latex-beamer-dokument-einbinden

@HenriMenke In case you would like to answer this question yourself, I will happily delete this


  1. Save you animation as an animated gif, see https://www.geogebra.org/manual/en/Export_to_LaTeX_%28PGF,_PSTricks%29_and_Asymptote#Export_-_Graphics_View_as_Animated_GIF for a tutorial

  2. Divide this .gif into individual frames. You can use the following command line expression to do this:

    convert -density 100 animate.gif animate-%d.pdf
    

    This will result in individual files, named animate-0.pdf to e.g. animate-200.pdf

  3. To animate these files in beamer:

    \documentclass{beamer}
    \usepackage{animate}
    \begin{document}
    \begin{frame}
      \animategraphics[
      autoplay,loop,
      width=.7\textwidth,
      height=.7\textheight
      ]{10}{animate/animate-}{0}{200}
    \end{frame}
    \end{document}
    
  4. Use adobe reader (or another viewer capable of javascript) to view the pdf.

1
  • Thanks for all your effort. I can convert to pdf but it won't animate. I am using beamer on a Mac using 10.12 and TeXShop 3.73 and will be giving an online tutorial using BigBlueButton to postgrads so I reckon that I will just have to prepare slides and click swiftly through them!
    – timbrophy
    Oct 9 '16 at 22:49

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.