4

I am still typsetting exams, and this time I want to see if I can manage to recreate an ice cream.

enter image description here

While my temporarily solution looks like this

enter image description here

The biggest problem is that my solution -- in lack of a better word -- looks plain. Is there some way to add some texture to the fill, and make it look slightly more realistic?

\documentclass[tikz,border=1mm]{standalone}

\definecolor{brownMedium}{HTML}{623d22}
\definecolor{brownLight}{HTML}{a78d7b}
\definecolor{brownDark}{HTML}{573722}

\begin{document}

    \begin{tikzpicture}
        \edef\w{10} \edef\h{6}

        \begin{scope}[shift={(0,0.5)},scale=1.1]
            \draw[color=brownDark, fill=brownDark,thick] (0,\w) -- (0,0) -- (\w,0)  -- (\w,\w);
            \draw[color=brownDark, fill=brownDark, thick] (\w,\w) arc(0:180:0.5*\w);
        \end{scope}

        \draw[color=brownMedium, thick, fill=brownMedium] (0,\w) -- (0,0) -- (\w,0)  -- (\w,\w);
        \draw[color=brownMedium,thick, fill=brownMedium] (\w,\w) arc(0:180:0.5*\w);

        \draw[color = brownLight, fill=brownLight, thick] (0.65*\w,-\h) arc(0:-180:0.15*\w);
        \draw[fill=brownLight, color = brownLight, thick] (0.65*\w,0) -- (0.65*\w,-\h) --  (0.35*\w,-\h) -- (0.35*\w,0);
    \end{tikzpicture}

\end{document}
2
  • 2
    Maybe you could build on the answers to this post or this post. TikZ is not necessarily made for this. (And you can't believe what happened when my fellow marmots saw the ice cream. ;-)
    – user121799
    May 27 '19 at 18:09
  • You might try a graphics editor. TikZ is better at illustrations than realism. May 28 '19 at 0:14
4
\documentclass[tikz,border=1mm]{standalone}
\begin{document}

\begin{tikzpicture}

\definecolor{brownMedium}{HTML}{623d22}
\definecolor{brownLight}{HTML}{a78d7b}
\definecolor{brownDark}{HTML}{573722}

%stick
\fill[brownLight] 
(-1,-3.17) -- (-1,-8.48) arc (-140:-39:1.2) -- (0.8,-3.16) --cycle;
%shadow
\fill[brownLight!95!black,rounded corners] 
(0.8,-3.15) -- (0.8,-3.9) -- (0.5,-4.3) -- (-0.8,-4.3) -- (-1,-4.1) -- (-1,-3.1);
%ice cream
\fill[brownDark] 
(-4.2,5.2) -- (-4.2,-3.1) -- (-3.96,-3.24) -- (3.26,-3.21) -- (3.86,-2.9) -- (3.84,5.8) .. controls (3.54,9.77) and (-3.4,10.05) .. cycle;
\fill[brownMedium]
(3.21,5.5) -- (3.26,-3.21) -- (-3.96,-3.24) -- (-4,5.5) .. controls (-2.2,10.1) and (2.41,9.1) .. cycle;

\end{tikzpicture}
\end{document}

Ice Cream with some little improvement

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.