비머에서 이미지의 특정 부분이 깜박이는 현상

비머에서 이미지의 특정 부분이 깜박이는 현상

아래 코드에 따라 tikz를 사용하여 라텍스로 이미지를 그렸습니다. 아래 코드를 통해 생성된 이미지는 내부에 텍스트 E(s)가 쓰여진 직사각형 블록으로 구성됩니다. 나는 이 직사각형 상자를 그 안에 있는 텍스트와 함께 깜박이고 밝게 빛나도록 만들고 싶습니다. 내가 어떻게 해?

\documentclass[compress, xcolor=table, usenames,dvipsnames]{beamer}
 \usepackage{tikz}
 \begin{document}

\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        
\begin{frame}{Figure}

\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,235); %set diagram left start at 0, and has 
height of 235

%Rounded Rect [id:dp22728745820859309] 
\draw   (134,66.75) .. controls (134,62.33) and (137.58,58.75) .. 
(142,58.75) -- (196,58.75) .. controls (200.42,58.75) and (204,62.33) .. 
(204,66.75) -- (204,90.75) .. controls (204,95.17) and (200.42,98.75) .. 
(196,98.75) -- (142,98.75) .. controls (137.58,98.75) and (134,95.17) .. 
(134,90.75) -- cycle ;
%Rounded Rect [id:dp23074367111159821] 
\draw   (254,64.75) .. controls (254,60.33) and (257.58,56.75) .. 
(262,56.75) -- (316,56.75) .. controls (320.42,56.75) and (324,60.33) .. 
(324,64.75) -- (324,88.75) .. controls (324,93.17) and (320.42,96.75) .. 
(316,96.75) -- (262,96.75) .. controls (257.58,96.75) and (254,93.17) .. 
(254,88.75) -- cycle ;
%Straight Lines [id:da3785057523496602] 
\draw    (205,77.75) -- (251.5,76.79) ;
\draw [shift={(253.5,76.75)}, rotate = 538.8199999999999] [color={rgb, 
    255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. 
controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and 
(6.95,1.4) .. (10.93,3.29)   ;

%Shape: Circle [id:dp7405273795099738] 
\draw   (350,76.5) .. controls (350,66.7) and (357.95,58.75) .. 
(367.75,58.75) .. controls (377.55,58.75) and (385.5,66.7) .. (385.5,76.5) 
.. controls (385.5,86.3) and (377.55,94.25) .. (367.75,94.25) .. controls 
(357.95,94.25) and (350,86.3) .. (350,76.5) -- cycle ;
%Straight Lines [id:da4768143479707079] 
\draw    (323.75,77) -- (349.25,77) ;
\draw [shift={(351.25,77)}, rotate = 180] [color={rgb, 255:red, 0; green, 
    0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) 
and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. 
(10.93,3.29)   ;

%Shape: Circle [id:dp9725542364076398] 
\draw   (70,78.5) .. controls (70,68.7) and (77.95,60.75) .. (87.75,60.75) 
.. controls (97.55,60.75) and (105.5,68.7) .. (105.5,78.5) .. controls 
(105.5,88.3) and (97.55,96.25) .. (87.75,96.25) .. controls (77.95,96.25) 
and (70,88.3) .. (70,78.5) -- cycle ;
%Straight Lines [id:da10367925110615261] 
\draw    (105.5,78.5) -- (135.75,78.5) ;
\draw [shift={(137.75,78.5)}, rotate = 180] [color={rgb, 255:red, 0; 
    green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls 
(6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) 
.. (10.93,3.29)   ;

%Straight Lines [id:da3384320385828452] 
\draw    (87.75,136) -- (341.75,136) ;
%Straight Lines [id:da9706282263267894] 
\draw    (341.75,136) -- (341.75,77) ;

%Straight Lines [id:da01968558683101662] 
\draw    (87.75,137) -- (87.75,96.25) ;



% Text Node
\draw (289,76.75) node  [align=left] {P(s)};
% Text Node
\end{tikzpicture}
\end{frame}

\end{document}

답변1

댓글에서 말했듯이 비머 문서에는 애니메이션을 수행하기 위한 도구가 내장되어 있습니다. 여기에는 패키지가 필요하지 않습니다 animate. 컴파일하면

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{chains}
\newcount\mymix
\begin{document}

\begin{frame}[t]
\frametitle{A scintillator}
\animate<2-22>
\animatevalue<1-21>{\mymix}{0}{20}
\centering
\begin{tikzpicture}[circ/.style={circle,inner sep=3.2mm,draw},
 box/.style={draw,rounded corners=3pt,minimum width=16mm,minimum height=8mm},
 line width=0.75pt]
 \begin{scope}[start chain=going right,nodes={on chain,join},
    every join/.style={-stealth}]
  \node[circ](C1){};
  \pgfmathtruncatemacro{\mixture}{10*ifthenelse(\the\mymix<11,\the\mymix,20-\the\mymix)}
  \node[box](B1){$\mathsf{C}(\mathsf{s})$};
  \node[box,fill=yellow!\mixture](B2){$\mathsf{P}(\mathsf{s})$};
  \node[circ](C2){};
 \end{scope}
 \path (B2.east) -- coordinate (aux)(C2.west) ;
 \draw[-stealth](aux) --++ (0,-1cm) -| (C1);
\end{tikzpicture}
\end{frame}
\end{document} 

Acrobat Reader에서 전체 화면 모드로 보면

여기에 이미지 설명을 입력하세요

내가 이 기회를 이용하여 Ti를 단축했다는 점에 주목하세요.케이Z 코드를 선택하고 번쩍이고 싶은 직사각형을 선택했으면 좋겠습니다. 물론 애니메이션의 세부 사항을 변경할 수 있습니다. 으로 비율을 변경할 수 있습니다 \transduration.

그러나 물론 animate패키지를 사용할 수도 있습니다. 위 내용을 이 패키지를 사용하는 코드로 변환하면 다음과 같은 결과가 나옵니다.

\documentclass{beamer}
\usepackage{animate}
\usepackage{tikz}
\usetikzlibrary{chains}
\begin{document}

\begin{frame}[t]
\frametitle{A scintillator}
\begin{animateinline}[autoplay,loop]{1}
  \multiframe{20}{it=0+1}{%
    \begin{tikzpicture}[circ/.style={circle,inner sep=3.2mm,draw},
   box/.style={draw,rounded corners=3pt,minimum width=16mm,minimum height=8mm},
   line width=0.75pt]
   \begin{scope}[start chain=going right,nodes={on chain,join},
      every join/.style={-stealth}]
    \node[circ](C1){};
    \pgfmathtruncatemacro{\mixture}{10*ifthenelse(\it<11,\it,20-\it)}
    \node[box](B1){$\mathsf{C}(\mathsf{s})$};
    \node[box,fill=yellow!\mixture](B2){$\mathsf{P}(\mathsf{s})$};
    \node[circ](C2){};
   \end{scope}
   \path (B2.east) -- coordinate (aux)(C2.west) ;
   \draw[-stealth](aux) --++ (0,-1cm) -| (C1);
  \end{tikzpicture}}
\end{animateinline}  
\end{frame}
\end{document}

두 경우 모두 섬광이 정확히 무엇을 의미하는지 알 수 없으므로 일부 매개변수를 조정해야 할 수도 있습니다.

관련 정보