[Latex]利用animate和tikz宏包绘制流程图的动画
2013-04-13 20:23
881 查看
[Latex]利用animate和tikz宏包很容易绘制流程图的动画,如下:
其中timeline文件如下:
%\input{tikz_file/图4-1.tex} %传热学 {\centering \small %----------------------------------------------------------------- \begin{animateinline}[autoplay,poster=last, begin={% \begin{tikzpicture}[node distance=4mm and 4mm , >=stealth,scale=1,line width=0.2pt, place/.style={rounded corners=1mm,rectangle,draw=blue!75,fill=yellow!75,thick, inner sep=1pt,minimum width=45mm}, placeG/.style={rounded corners=1mm,rectangle,draw=blue!75,fill=yellow!75,thick, inner sep=1pt,minimum width=25mm}, post/.style={->,shorten >=1pt,very thick,black} ] \useasboundingbox(0,0)rectangle(10,7); }, end={ \end{tikzpicture} }, timeline=图4-1.timeline ]{2} %节点 \coordinate (T) at(4,6.5); %0定义坐标 \newframe \node[place] (A) at(T) {建立控制方程和定解条件}; %1 \newframe \node[place] (B) [below=of A ] {确定节点(区域离散化)}; %2 \newframe \node[place] (C) [below=of B ] {建立节点物理量的代数方程}; %3 \newframe \node[place] (D) [below=of C ] {设立温度场的迭代初值}; %4 \newframe \node[place] (E) [below=of D ] {求解代数方程组}; %5 \newframe \node(F) [below=of E,shape aspect=2.5,rounded corners=1mm,diamond,draw=blue!75,fill=yellow!75,thick, inner sep=1pt,minimum width=30mm] {是否收敛?}; %6 \newframe \node[placeG] (G) [right=of E] {改进初场}; %7 \newframe \node[place] (H) [below=of F] {解的分析}; %8 %绘制箭头 \newframe \draw (A) edge[post](B); %9 \newframe \draw (B) edge[post](C); %10 \newframe \draw (C) edge[post](D); %11 \newframe \draw (D) edge[post](E); %12 \newframe \draw (E) edge[post](F); %13 \newframe \node (J0) [above,black] at ($(F.east)+(1,0)$){否}; %14 \draw[->,very thick,black] (F.east) -|(G.south); % \draw[->,very thick,black] (G.north) |-($(D)!0.5!(E)$); % \newframe \node (J) [above,red] at ($(F.east)+(1,0)$){否}; %15 \draw[->,very thick,red] (F.east) -|(G.south); \draw[->,very thick,red] (G.north) |-($(D)!0.5!(E)$); \newframe \node (I) [right,black] at ($(F.south)!0.5!(H.north)$){是}; %16 \draw (F) edge[->,shorten >=1pt,line width =2pt,black](H);% \newframe \draw (F) edge[->,shorten >=1pt,line width =2pt,green](H);%17 \node (I0) [right,green] at ($(F.south)!0.5!(H.north)$){是}; \end{animateinline} } %----------------------------------------------------------------- \endinput
其中timeline文件如下:
:3:0x0 :3:1x0 :3:2x0 :3:3x0 :3:4x0 :3:5x0 :3:6x0 :3:7x0 :3:8x0 :3:9x0 :3:10x0 :3:11x0 :3:12x0 :3:13x0 :2:14x1 :2:15x1 :2:14x1 :2:15x1 :2:14x1 :2:15x0 :2:16x1 :2:17x1 :2:16x1 :2:17x1 :2:16x1 :2:17x0 :2:18x0最后一帧动画的显示界面如下:
相关文章推荐
- [latex]在beamer中使用tikz和animate宏包绘制PDF动画的示例
- 在LaTeX中利用preview宏包和tikz宏包生成单图pdf
- 利用Html 5的canvas标签绘制水流和水池动画
- Android 利用属ObjectAnimator,AnimatorSet性动画绘制一个弹球,加速下落,到底部时挤压,然后减速上弹
- Latex 绘制流程图
- 利用"animateWithDuration"实现带弹簧动画的顶部通知栏
- 利用jQuery的动画函数animate实现豌豆发射效果
- Android view利用canvas绘制动画(一)
- Latex插入Visio绘制的流程图
- 利用emacs+graphviz绘制流程图
- latex绘制流程图及中文显示问题
- 在Android中利用动画效果绘制正弦波
- [VB.NET]利用Timer控件的Tick()事件在自定义控件上绘制动画!
- 利用c语言绘制漫天星空-动画
- 如何利用Latex绘制圣诞树
- 利用c语言绘制漫天星空-动画
- 利用jQuery的动画函数animate实现豌豆发射效果
- React Native SVG Animated 绘制动画
- 利用CAGradientLayer绘制颜色渐变动画
- Latex插入Visio绘制的流程图