[Tex/LaTex] draw realistic clouds with tikz

tikz-pgf

I've drawn the following image:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes}
\tikzset{sunbody/.style={line width=1pt,draw=orange,fill=yellow,circle,minimum size=5cm}}

\begin{document}
\begin{tikzpicture}
% draw ground
\fill[brown] (-20,0) -- (-5,10) -- (15,10) -- (8,0) -- cycle;
% draw sun
\draw (13,16) node[sunbody] {};
% draw cloud
\node[cloud, cloud puffs = 10, draw, minimum width = 7cm, minimum height = 4cm, fill = gray!10] at (8,15){};
\end{tikzpicture}
\end{document}

which results in

enter image description here

where the brown area is the earth surface. I would like to try and make this more realistic. I am quite happy with most of the drawing, apart from the cloud. Can anyone suggest a method for making the cloud look more realistic? Its kind of hard to put this into words but I would like it to cover a greater portion of the sky similar to what clouds actually look like in reality, with gaps and such. Hope this makes sense. Any advice would be appreciated.

Best Answer

Here is a possible realisation of a more realistic cloud (and sun and ground).

I have used the shadows library, see Section 66. Shadows in the TikZ & PGF manual (version 3.0.0). For the clouds I have only drawn circles that overlap each other in a quite regular grid (see the code below the comment % cloud). If you want something else, you can draw (not entirely) overlapping shapes in a more irregular way to achieve a more natural look.

\documentclass{article}

\usepackage[svgnames]{xcolor}

\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing, shadows}

\colorlet{groundcolor}{Black!5!Tan}
\colorlet{darkgroundcolor}{groundcolor!75!Black}
\colorlet{suncolor}{Gold!50!Yellow}
\colorlet{lightsuncolor}{White!5!Gold!35!Yellow}
\colorlet{cloudcolor}{LightGrey!50!Lavender}

\usepackage[active, tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength{\PreviewBorder}{0.5cm}

\begin{document}
\begin{tikzpicture}
    \tikzstyle{distorted}=[xslant=1.125,%
        yscale=0.4]

    % ground
    \filldraw[groundcolor, distorted] (0, 0) rectangle (10, 10);
    \foreach \x in {0.1, 0.2, ..., 9.9} {
        \draw[darkgroundcolor,%
            very thick,%
            decoration={random steps,%
                segment length=3pt,%
                amplitude=0.5pt},%
            decorate,%
            distorted] (\x, 0.075) -- (\x, 9.925);
    }

    % complex sun
    \begin{scope}[xshift=13cm, yshift=7cm]
    \foreach \x in {0, 30, ..., 350} {
        \filldraw[suncolor,%
            circular glow={fill=suncolor},%
            rotate=\x] (-0.75, 0) parabola (0, 1.35) parabola[bend at end] (0.75, 0) -- cycle;
    }
    \filldraw[lightsuncolor,%
        circular glow={fill=lightsuncolor}] (0, 0) circle[radius=0.75];
    \end{scope}

    % simple sun
    %\filldraw[suncolor,
    %   circular glow={fill=suncolor}] (13, 7) circle[radius=1];

    % cloud
    \foreach \x / \y in {10 / 6, 10.5 / 6.5, 11.5 / 6.5, 12 / 6, 11 / 5.75} {
        \filldraw[cloudcolor,%
            circular glow={fill=cloudcolor}] (\x, \y) circle [radius=0.75];
    }
\end{tikzpicture}
\end{document}