Forgot password?
 Create new account
View 816|Reply 2

请教怎么做一个动画?

[Copy link]

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2020-3-23 12:10:50 |Read mode
如题,想做一个离散卷积的动画,方便我直观一点理解。就是想像下面这样的,每次上一行往左移动一格,或下一行往右移动一格。最好是交叉处能标上不同的颜色。
1.\[\begin{array}{cccccc}
~&~&~&6&5&4\\
1&2&3&~&~&~
\end{array}\]
2.\[\begin{array}{cccccc}
~&~&6&5&4&~\\
1&2&3&~&~&~
\end{array}\]
3.\[\begin{array}{cccccc}
~&6&5&4&~&~\\
1&2&3&~&~&~
\end{array}\]
4,5,6

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2020-3-23 18:52:13
animate 宏包试一试……
  1. \documentclass{article}
  2. \usepackage{xcolor}
  3. \usepackage{animate}
  4. \begin{document}
  5. \begin{center}
  6. \begin{animateinline}[controls]{1}
  7. $\begin{array}{cccccc}
  8. ~&~&~&6&5&4\\
  9. 1&2&3&~&~&~
  10. \end{array}$
  11. \newframe
  12. $\begin{array}{cccccc}
  13. ~&~&\color{red}6&5&4&~\\
  14. 1&2&\color{red}3&~&~&~
  15. \end{array}$
  16. \newframe
  17. $\begin{array}{cccccc}
  18. ~&\color{blue}6&\color{green}5&4&~&~\\
  19. 1&\color{blue}2&\color{green}3&~&~&~
  20. \end{array}$
  21. \end{animateinline}
  22. \end{center}
  23. \end{document}
Copy the Code
编译后得用 Adobe Reader 或其他软件打开才能播放和控制动画,总之 SumatraPDF 是不行的。

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2020-3-24 10:53:56
谢谢,别的软件只能看到第一帧,还有那几个按钮,特意下载了 Adobe Reader 才显示出动画来,看样这个还不太通用。

手机版Mobile version|Leisure Math Forum

2025-4-20 22:04 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list