animazioni tikz beamer

  • Creatore
    Topic
  • #69764
    claudio
    Partecipante
      Up
      0
      Down
      ::


      salve voglio postare come ho risolto un piccolo problema
      in pratica mi serviva un’animazione con cui con un movimento rigido dovevo sovrapporre due segmenti
      non sapevo come fare quando ho trovato questo post di geogebra
      quindi ho prodotto con geogebra
      `
      \documentclass[10pt]{article}
      \usepackage{pgf,tikz}
      \usetikzlibrary{arrows}
      \pagestyle{empty}
      \begin{document}
      \definecolor{uququq}{rgb}{0.25,0.25,0.25}
      \definecolor{xdxdff}{rgb}{0.49,0.49,1}
      \definecolor{qqqqff}{rgb}{0,0,1}
      \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
      \clip(-4.3,-4.22) rectangle (7.96,6.3);
      \draw (0.06,1.2)– (7.12,1.2);
      \draw (0.06,1.2)– (3.58,3.76);
      \draw (0.06,1.2)– (4.13,2.74);
      \draw (0.06,1.2)– (4.37,1.81);
      \draw (0.06,1.2)– (4.41,1.2);
      \begin{scriptsize}
      \fill (0.06,1.2) circle (1.5pt);
      \draw (0.2,1.48) node {$A$};
      \fill (3.58,3.76) circle (1.5pt);
      \draw (3.74,4.04) node {$B$};
      \fill (7.12,1.2) circle (1.5pt);
      \draw (7.28,1.48) node {$C$};
      \fill (4.13,2.74) circle (1.5pt);
      \draw (4.3,3.02) node {$D$};
      \fill (4.37,1.81) circle (1.5pt);
      \draw (4.52,2.08) node {$E$};
      \fill (4.41,1.2) circle (1.5pt);
      \draw (4.56,1.48) node {$F$};
      \end{scriptsize}
      \end{tikzpicture}
      \end{document}
      `
      l’ho ripulito con
      QTikz
      `
      \begin{tikzpicture}[line cap=round,line join=round,x=1.0cm,y=1.0cm]
      \clip(-4.3,-4.22) rectangle (7.96,6.3);
      %1
      \draw (0.06,1.2)– (7.12,1.2);
      %2
      \draw (0.06,1.2)– (3.58,3.76);
      \draw (0.06,1.2)– (4.13,2.74);
      \draw (0.06,1.2)– (4.37,1.81);
      \draw (0.06,1.2)– (4.41,1.2);
      \begin{scriptsize}
      \fill (0.06,1.2) circle (1.5pt);
      \draw (0.2,1.48) node {$A$};
      \fill (3.58,3.76) circle (1.5pt);
      \draw (3.74,4.04) node {$B$};
      \fill (7.12,1.2) circle (1.5pt);
      \draw (7.28,1.48) node {$C$};
      \fill (4.13,2.74) circle (1.5pt);
      \draw (4.3,3.02) node {$D$};
      \fill (4.37,1.81) circle (1.5pt);
      \draw (4.52,2.08) node {$E$};
      \fill (4.41,1.2) circle (1.5pt);
      \draw (4.56,1.48) node {$F$};
      \end{scriptsize}
      \end{tikzpicture}
      `
      ho utilizzato lo schema proposto nel forum
      `
      \begin{animateinline}[
      begin={
      \begin{tikzpicture}[…]
      \clip(…,…) rectangle (…,…);
      },
      end={\end{tikzpicture}},
      controls,timeline=time2.txt]{1}
      \code
      \newframe
      \code
      \newframe

      \end{animateinline}
      `
      e questo è il frame finale

      `
      \begin{frame}[fragile]
      \begin{animateinline}[
      begin={
      \begin{tikzpicture}[line cap=round,line join=round,x=1.0cm,y=1.0cm]
      \clip(-4.3,-4.22) rectangle (7.96,6.3);
      },
      end={\end{tikzpicture}},controls,timeline=time2.txt]{1}
      \fill (0.06,1.2) circle (1.5pt);
      \draw (0.2,1.48) node {$A$};
      \fill (3.58,3.76) circle (1.5pt);
      \draw (3.74,4.04) node {$B$};
      \fill (7.12,1.2) circle (1.5pt);
      \draw (7.28,1.48) node {$C$};
      \draw (0.06,1.2)– (7.12,1.2);
      \draw (0.06,1.2)– (3.58,3.76);
      \newframe
      \fill (4.13,2.74) circle (1.5pt);
      \draw (4.3,3.02) node {$D$};
      \draw (0.06,1.2)– (4.13,2.74);
      \newframe
      \fill (4.37,1.81) circle (1.5pt);
      \draw (4.52,2.08) node {$E$};
      \draw (0.06,1.2)– (4.37,1.81);
      \newframe
      \fill (4.41,1.2) circle (1.5pt);
      \draw (4.56,1.48) node {$F$};
      \draw (0.06,1.2)– (4.41,1.2);
      \end{animateinline}
      \end{frame}
      `

      sicuramente migliorabile 🙂

      saluti
      claudio

    • Devi essere connesso per rispondere a questo topic.

    Go to top