11

I am trying to reproduce the following picture in tikz

enter image description here

I am able to draw something that looks like that but it's not the same... Any chance to draw it or make it even more fancy?

My code is

\documentclass[demo]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{%
    calc,%
    fadings,%
    shadings%
}

\usetikzlibrary{arrows,shapes}
\usetikzlibrary{shapes.geometric,calc}
\usetikzlibrary{backgrounds,fit}
\usetikzlibrary{shadows}
\usetikzlibrary{snakes}
\usetikzlibrary{decorations.text}
\usetikzlibrary{positioning}
\usepackage{graphicx}
\begin{document}
  \begin{tikzpicture}
   \draw[fill=black] (0,0) circle (1cm);
   \draw[fill=black] (0,0.75) ellipse (1cm and 0.25cm);
   \draw[fill=black] (0,-1) ellipse (0.6cm and 0.1cm);
   \draw[fill=gray] (0,0.75) ellipse (0.8cm and 0.15cm);
  \end{tikzpicture}
\end{document}

and my output is

enter image description here

  • 1
    Ow, very nice! Make the biggest ellipse a little bit shorter, I mean, lower its height. Also, you can draw triangles with rounded vertices to produce the bottom. – Sigur May 11 '15 at 16:32
  • Did you try tex.stackexchange.com/a/60697/14500 ? – Paul Gaborit May 11 '15 at 17:25
19

Here's one fairly basic variant:

cauldron

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
  \begin{tikzpicture}
    [
      black filler/.style={outer color=black, inner color=black!50, postaction={fill=black, fill opacity=.5}}
    ]
   \path (-130:1.15 and .8) node [draw=black, rotate=-130, fill=black, rounded corners=2pt, isosceles triangle, minimum width=.25] {};
   \path (-50:1.15 and .8) node [draw=black, rotate=-50, fill=black, rounded corners=2pt, isosceles triangle, minimum width=.25] {};
    \draw [black filler] (0,0) circle (1.25 and .9);
   \draw [inner color=black!25, outer color=black] (0,0.75) ellipse (1 and 0.25);
   \path [inner color=gray, outer color=gray!75!black] (0,0.75) ellipse (0.85 and 0.175);
  \end{tikzpicture}
\end{document}

EDIT

Here's a pic version. The pic is called cauldron and takes 3 arguments: the first is a size e.g. 1 or 10pt or 2cm; the second and third are the colours of the cauldron's contents. The size determines the relative size of the cauldron.

Not sure what you are cooking up, but think of Halloween....

\PassOptionsToPackage{svgnames}{xcolor}
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{shapes.geometric,shadows}
\begin{document}
  \tikzset{
    cauldron filler/.style={draw=black, outer color=black, inner color=black!50, postaction={fill=black, fill opacity=.5}},
    legs/.style={draw=black, fill=black, rounded corners=2pt, isosceles triangle, minimum width=.25},
    cauldron glow/.style={circular glow={fill=#1}},
    rim filler/.style={inner color=black!50, outer color=black},
    liquid/.style={inner color=#1, outer color=#1!75!black},
    pics/cauldron/.style n args=3{
      code={
        \path (-130:1.15*#1 and .8*#1) node [rotate=-130, legs] {};
        \path (-50:1.15*#1 and .8*#1) node [rotate=-50, legs] {};
        \path [cauldron filler] (0,0) circle (1.25*#1 and .9*#1);
        \path [rim filler] (0,0.75*#1) ellipse (.975*#1 and 0.255*#1);
        \path [cauldron glow=#2] (0,.75*#1) circle (.75*#1 and .18*#1);
        \path [liquid=#3] (0,0.75*#1) ellipse (0.825*#1 and 0.1725*#1);
      }
    }
  }
  \begin{tikzpicture}
    \path (0,0) pic {cauldron={1}{Silver}{gray}} ++(2.75,0) pic {cauldron={.75}{Silver}{Lime}} ++(2,0) pic  {cauldron={.5}{Chartreuse}{ForestGreen}} (-2.75,0)  pic {cauldron={.75}{Silver}{Crimson}} ++(-2,0)  pic  {cauldron={.5}{Red}{Maroon}};
  \end{tikzpicture}
\end{document}

Cauldrons

EDIT 2

And here's one with a rim and 'fuzzier' contents:

\PassOptionsToPackage{rgb,x11names,svgnames,dvipsnames}{xcolor}
\documentclass[tikz,border=5pt,multi]{standalone}
\usetikzlibrary{shapes.geometric,shadows}
\begin{document}
  \tikzset{
    cauldron filler/.style={draw=black, outer color=black, inner color=black!50, postaction={fill=black, fill opacity=.5}},
    legs/.style={draw=black, fill=black, rounded corners=2pt, isosceles triangle, minimum width=.25},
    cauldron glow/.style={circular glow={fill=#1}},
    rim drop/.style={rim filler, postaction={fill=#1!75!black, path fading=fuzzy ring 15 percent}},
    rim filler/.style={inner color=black!50, outer color=black, draw=black},
    fuzzy liquid/.style={inner color=#1, outer color=#1!75!black, path fading=circle with fuzzy edge 10 percent},
    pics/rimmed cauldron/.style n args=3{
      code={
        \path (-130:1.15*#1 and .8*#1) node [rotate=-130, legs] {};
        \path (-50:1.15*#1 and .8*#1) node [rotate=-50, legs] {};
        \path [cauldron filler] (0,0) circle (1.25*#1 and .9*#1);
        \path [rim drop=#2] (0,0.75*#1) ++(0,-.0125*#1) ellipse (.975*#1 and 0.275*#1);
        \path [rim filler] (0,0.75*#1) ellipse (.975*#1 and 0.255*#1);
        \path [cauldron glow=#2] (0,.75*#1) circle (.75*#1 and .18*#1);
        \path [fuzzy liquid=#3] (0,0.75*#1) ellipse (0.825*#1 and 0.1725*#1);
      }
    }
  }
  \begin{tikzpicture}
    \path pic {rimmed cauldron={1}{Silver}{Turquoise}};
  \end{tikzpicture}
\end{document}

rimmed cauldron with fuzzy liquid

  • I love it, this should become a package :-) – Daniel May 11 '15 at 22:25
  • @Daniel Thanks ;). I don't think this would make enough for a package but hopefully it will be useful. Or at least entertaining - maybe that would be even better ;). – cfr May 11 '15 at 23:17
  • 1
    What are you cooking with that glow? Is it radio active? ;-) – user11232 May 11 '15 at 23:58
  • 2
    @HarishKumar I was thinking more Harry Potter... ;). The image the OP posted reminded me of a Halloween icon created, I think, for Mac OS X: a black cauldron with glowing green contents. I assume the ingredients are eye of newt rather than uranium, although I'm not really keen on either. – cfr May 12 '15 at 0:31
9
\documentclass[border=5]{standalone}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}
   \fill[rounded corners=1ex] (-1.25,0) -- (-1.6,-1.6) -- (0,-1) -- cycle;
   \fill[rounded corners=1ex] (1.25,0) -- (1.6,-1.6) -- (0,-1) -- cycle;
   \draw[inner color=black!80,outer color=black] (0,0) ellipse (2cm and 1.4cm);
   \draw[fill=gray,line width=1.5mm] (0,1.1) ellipse (1.6cm and 0.25cm);
  \end{tikzpicture}
\end{document}

enter image description here

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.