如何在 tikz 中绘制下图

如何在 tikz 中绘制下图

在此处输入图片描述

我想重现这个数字。以下是我目前所得到的:

\documentclass{article}

\usepackage{pgfplots,tikz}  % pgfplots -> for plotting
\usetikzlibrary{calc,patterns,angles,quotes,decorations.pathmorphing}
\usepgfplotslibrary{fillbetween}

\begin{document}

\begin{figure}
  \centering
  \begin{tikzpicture}
    \coordinate (a1) at (0,0);
    \coordinate (b1) at (2,-0.3);
    \coordinate (c1) at (12,-1);
    \coordinate (d1) at (10.5,-1.2);
    \coordinate (e1) at (2,-0.6);
    \draw[line width=0.5mm,color=blue!80!green!70,fill=blue!80!green!10] (a1)--(b1)--(c1)--(d1)--(e1)--(a1);

    \coordinate (a2) at (-3,2.5);
    \coordinate (b2) at (-2.3,2.4);
    \coordinate (c2) at (4,0.8);
    \coordinate (d2) at (9,0.4);
    \coordinate (e2) at (12.5,2.2);
    \coordinate (f2) at (-2.9,2.6);
    \draw[line width=0.5mm,color=blue!80!green!70,fill=blue!80!green!10] (a2)--(b2)--(c2)--(d2)--(e2)--(f2)--(a2);
    \draw[line width=0.4mm,red] (b2)--(0.4,-0.8);
    \draw[line width=0.4mm,red] (-2.8,2.3)--(-0.5,-1);
    \draw[line width=0.4mm,red] (0,0.05)--(2.5,1.15)--(4,-0.44);
    \draw[line width=0.4mm,red] (b1)--(4.2,0.77);

    \draw[line width=0.3mm,purple,fill=purple!50] plot [smooth,tension=1] coordinates {(4.50,0.74) (4.73,0.61) (4.95,0.58) (5.18,0.52) (5.41,0.57) (5.63,0.55) (5.86,0.56) (6.08,0.47) (6.31,0.51) (6.54,0.49) (6.76,0.40) (6.99,0.43) (7.22,0.41) (7.44,0.46) (7.67,0.35) (7.89,0.25) (8.12,0.27) (8.35,0.28) (8.57,0.18) (8.80,0.4)};
    \draw[line width=0.3mm,purple,fill=purple!50] plot [smooth,tension=1] coordinates {(4.60,-0.46) (4.83,-0.40) (5.05,-0.38) (5.28,-0.34) (5.51,-0.44) (5.73,-0.4) (5.96,-0.45) (6.18,-0.37) (6.41,-0.41) (6.64,-0.45) (6.86,-0.55) (7.09,-0.5) (7.2,-0.48) (7.4,-0.55) (7.7,-0.5) (7.9,-0.63) (8.22,-0.6) (8.45,-0.69) (8.67,-0.56) (8.90,-0.76)};

    \draw[line width=0.4mm,red] (4.35,0.75)--(5.2,-0.35);
    \draw[line width=0.4mm,red] (4.3,-0.44)--(5.25,0.53);
    \draw[line width=0.4mm,red] (5.4,0.57)--(6.2,-0.37);
    \draw[line width=0.4mm,red] (5.45,0.-0.41)--(6.3,0.5);
    \draw[line width=0.4mm,red] (6.35,0.5)--(7.2,-0.49);
    \draw[line width=0.4mm,red] (6.8,-0.54)--(7.3,0.43);
  \end{tikzpicture}
  \caption{Test plotting; scramjet engine.}
\end{figure}

\end{document}

我的身材是这样的

在此处输入图片描述

但我不知道如何重现右侧的橙色区域。此外,我无法紧密匹配颜色。

我知道我的方法很幼稚。但是有什么建议吗?谢谢。

更新:

按照@Symbol1 的做法做了一些调整,这就是我现在得到的结果。不过看起来不如原版好……

在此处输入图片描述

顺便问一下,有人知道如何重现那些原始的蓝色吗?我觉得它们看起来更舒服。

答案1

你想要一个阴影从深橙色到深黄色,再到白色。类似下面的

\documentclass[tikz]{standalone}
\usetikzlibrary{shadings,fadings}
\colorlet{jet-orange}{orange!80!black}
\colorlet{jet-yellow}{yellow!80!black}
\begin{document}
\tikz{
    \shade[left color=jet-orange,right color=jet-yellow]
        (0,0)rectangle(5,5);
    \shade[left color=jet-yellow,right color=white]
        (5,0)rectangle(10,5);
}
\end{document}

为了产生模糊/嘈杂的效果,请添加频率更高的阴影/淡入淡出。

\tikz{
    \shade[left color=jet-orange,right color=jet-yellow]
        (0,0)rectangle(5,5);
    \shade[left color=jet-yellow,right color=white]
        (5,0)rectangle(10,5);
    \clip(0,0)rectangle(10,5); % clip the circles that bleed
    \foreach\i in{1,...,10}{% add 10 fuzzy circles
        \shade[inner color=jet-orange,outer color=jet-yellow,
            path fading=circle with fuzzy edge 20 percent,opacity=1/5]
            (\i/2,rnd*5)circle(1+rnd*2);
    }
}

在此处输入图片描述

相关内容