使用 TikZ 绘图

使用 TikZ 绘图

我无法创建如下所示的图像(a)和(b)

在此处输入图片描述

上面的图片借自http://www.nature.com/nmat/journal/v1/n1/fig_tab/nmat715_F1.html

有人可以指导我创建图像(a)或图像(b)吗?

谢谢。

答案1

这是一次尝试,我在最后一张图片中留下微米作为练习 ;-)

在此处输入图片描述

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadings}

\begin{document}

\scriptsize

\begin{tikzpicture}

\begin{scope}
    \clip (-2.5,0) rectangle (2.5,1) ; 
    \shade[outer color=blue!50, inner color=white] (2,0) arc (60:120:4 and 6) arc (240:300:4 and 6) ; 
\end{scope}

\begin{scope}[shift={(2,0)}]
    \draw[dashed] (0,0)--(140:1.5) ;
    \draw[<-,>=stealth] (140:.8) arc (140:180:.8) ;
\end{scope}

\node[text width=1.7cm,align=center] at  (0,.5) 
            {Internal \\ contact angle} ;
\node[below]{\bf Normal surface} ;

\draw[very thick] (-2.55,0)--(2.55,0) ;

\end{tikzpicture}

\begin{tikzpicture}
\begin{scope}
    \clip (-2.5,0) rectangle (2.5,3.8) ; 
    \shade[outer color=blue!50, inner color=white] (2,1.75) arc (0:180:2) arc (180:360:2 and 1.8) ; 
\end{scope}

\begin{scope}[shift={(.5,0)}]
    \draw[dashed] (0,0)--(18:2) ;
    \draw[<-,>=stealth] (18:.5) arc (18:180:.5)
    node[midway,anchor=south] {Increased angle};
\end{scope}

\node[below]{\bf Superhydrophobic surface} ;
\draw[very thick] (-2.55,0)--(2.55,0) ;

\end{tikzpicture}

\begin{tikzpicture}
\filldraw (-2.55,-.8) rectangle (2.55,0) ;
\foreach \i in {-2.45,-2.25,...,2.4} {%
    \begin{scope}[shift={(\i,0)}]
    \filldraw[white] (0,.1) rectangle (0.09,-.4) ;
    \end{scope}
    }

    \shade[outer color=blue!50, inner color=white] (2,1.75) arc (0:180:2) arc (180:360:2 and 1.8) ; 

    \draw[dashed,->,>=stealth] (0,1.80)--++(60:1.95)
    node[midway,sloped,above] {0.7\,mm};


\end{tikzpicture}

\end{document}

相关内容