Friday, June 27, 2014
[P&D/CG] 究進青龍!
最近迷上了 P&D 這遊戲,玩了 12x 天,現在已是 218 rank,可惜還沒有可以橫掃降臨的強隊(這類隊伍多需要數千元的課金額 ...)。
以下是究進了的(水暗)青龍!因為是龍的關係,特地學習有關龍的畫法:
呀呀呀,以下才是主角!
把它們合併並作一些微調:
彩圖用的線稿正在處理中!
Tuesday, June 24, 2014
[Beamer] 有用的小技巧
快要 defense,presentation 決定採用 beamer 形式裝作 power point (原因嘛,簡單方便快捷!)。
技巧 2. 若數式以 align/align* environment 進行等號對齊,用家會發現在 "\\" 後加上 \pause 會出現錯誤。beamer 這先天的缺點有以下的 solution:
技巧 1. 一般人對 beamer 感到最厭煩的就是每一個 \frame{} 裏都要加上 \frametitle{},其作用有點類似文章的 section。漏掉的話會整欄空掉,蠻奇怪的。以下一段 code 能夠在接着的 frame 中不斷承繼上一個 frame 的 title (直至令立 title 為止):
\makeatletter
\def\beamer@checkframetitle{%
\begingroup
\edef\temp{%
\endgroup
\noexpand\frametitle
[\unexpanded\expandafter{\beamer@savedshortframetitle}]%
{\unexpanded\expandafter{\beamer@savedframetitle}}%
}
\temp
\@ifnextchar\bgroup\beamer@inlineframetitle{}}
\long\def\beamer@@frametitle[#1]#2{%
\beamer@ifempty{#2}{}{%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space\usebeamertemplate*{frametitle
continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
\global\let\beamer@savedshortframetitle\beamer@shortframetitle
\global\let\beamer@savedframetitle\beamer@frametitle
}%
}
\global\let\beamer@savedshortframetitle\@empty
\global\let\beamer@savedframetitle\@empty
\makeatother
技巧 2. 若數式以 align/align* environment 進行等號對齊,用家會發現在 "\\" 後加上 \pause 會出現錯誤。beamer 這先天的缺點有以下的 solution:
\makeatletter
\def\pdftex@driver{pdftex.def}
\ifx\Gin@driver\pdftex@driver
\def\pgfsys@color@unstacked#1{%
\pdfliteral{\csname\string\color@#1\endcsname}%
}
\fi
\makeatother
Sunday, June 15, 2014
[Tikz] Draw contours with midway arrow
The code is as follows: In the preamble, paste (with the package "tikz" loaded of course!):
As an exmaple, see:
\usetikzlibrary{decorations.pathreplacing,decorations.markings}
\tikzset{
% style to apply some styles to each segment of a path
on each segment/.style={
decorate,
decoration={
show path construction,
moveto code={},
lineto code={
\path [#1]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
},
curveto code={
\path [#1] (\tikzinputsegmentfirst)
.. controls
(\tikzinputsegmentsupporta) and (\tikzinputsegmentsupportb)
..
(\tikzinputsegmentlast);
},
closepath code={
\path [#1]
(\tikzinputsegmentfirst) -- (\tikzinputsegmentlast);
},
},
},
% style to add an arrow in the middle of a path
mid arrow/.style={postaction={decorate,decoration={
markings,
mark=at position .5 with {\arrow[#1]{stealth}}
}}},
}
As an exmaple, see:
\begin{tikzpicture}[scale=2]
\clip (0.6,3.75) rectangle (3.85,0.85);
\draw[thick] (0,0) ellipse (3 and 3);
\draw[postaction={on each segment={mid arrow}}] (60:2) arc (60:30:2) -- (30:2.8) arc(30:60:2.8)--cycle;
\draw[postaction={on each segment={mid arrow}}] (30:4.2)arc (30:60:4.2) --(60:3.2)arc (60:30:3.2)--cycle;
\node at (1.745,1.795) {$L_1(r)$};
\node at (0.9,2.15) {$L_2(r)$};
\node at (1.225,1.2) {$L_3(r)$};
\node at (2.275,1) {$L_4(r)$};
\node at (2.5,2.425) {$T_1(r)$};
\node at (3.45,1.65) {$T_2(r)$};
\node at (3.225,3.125) {$T_3(r)$};
\node at (1.575,3.325) {$T_4(r)$};
\end{tikzpicture}
Subscribe to:
Posts (Atom)