[Tex/LaTex] How to make a pumpkin, jack-o-lantern, or other halloween spirit, ghoul, or skeleton

funpstrickstikz-pgf

We have questions about Christmas trees and Hearts for Valentines but we have no questions that specialize in Halloween or Dia de los Muertos art. Here it goes:

Using TikZ or PSTricks or any other of your favorite LaTeX tools, create pumpkins, ghouls, etc., appropriate to the season.

I think multiple submissions should be fine provided different objects are created.

Best Answer

Here's some diabolical TikZ code:

\documentclass[tikz,border=0]{standalone}
\usetikzlibrary{backgrounds}
\begin{document}
\tikz[background rectangle/.style={fill=black},show background rectangle]\foreach\c[count=\i from0]in{red!10!black,red!15!black,red!20!black,red!25!black,red!30!black,red!35!black,red!40!black,red!45!black,red!50!black,red!55!black,red!60!black,red!65!black,red!75!black,red!75!black!75!orange,red!75!black!50!orange,red!75!black!25!orange,red!75!black!5!orange,orange,orange!75!yellow,orange!50!yellow,orange!25!yellow,yellow,yellow!75,yellow!50,white}\clip[preaction={fill=\c},xscale=1-\i/100,yshift=(\i>0)*1.5](-6,-7)(6,3)\foreach\x in{1,-1}{[xscale=\x](0:1)to[bend right]++(315:2)to[bend right]++(60:4)to[bend right,looseness=0.5]cycle}[shift=(270:\i/15),yscale=1-\i/50](0:5)arc(360:330:5 and 3)\foreach\i in{330,300,270,240}{arc(\i:\i-10:5 and 3)--(\i-15:5 and 5)--(\i-20:5 and 3)arc(\i-20:\i-30:5 and 3)}arc(210:180:5 and 3)arc(180:195:5 and 6)\foreach\i in{195,225,255,285,315}{arc(\i:\i+10:5 and 6)--(\i+15:5 and 4)--(\i+20:5 and 6)arc(\i+20:\i+30:5 and 6)}arc(345:360:5 and 6)--cycle;
\end{document}

enter image description here

And this may take until next Halloween to compile:

\documentclass[tikz,border=0]{standalone}
\usetikzlibrary{decorations,backgrounds}
\tikzset{pics/flame/.style 2 args={code={
  \fill [fill=#1, yscale=1-#2/4, xscale=1-#2/5, rotate=rand*5]
    (0:.5+rnd) coordinate (a) arc (360:180:1 and 1) 
    .. controls ++(90:rnd)            and ++(270:rnd) .. (90+rand*5:2+rnd*2)
    .. controls ++(270+rand*5:.5+rnd) and ++(90+rand*5:.5+rnd) .. (a) 
    \pgfextra{\pgfgetpath\flame\global\let\flame=\flame};
  \foreach \l in {1,...,20}
    \draw [draw=#1, line width=\l/2, draw opacity=1/10] \pgfextra{\pgfsetpath\flame};
}}}
\pgfdeclaredecoration{flames}{burn}{
  \state{burn}[width=\pgfdecorationsegmentlength]{
     \pic {flame={flame}{\pgfdecorationsegmentamplitude}};
   }
}
\colorlet{flame}{red}
\begin{document}
\foreach \i in {1,...,5}{
\begin{tikzpicture}[background rectangle/.style={fill=black}, show background rectangle, line join=round]
\useasboundingbox (-20,-20) rectangle (20,20); 
\foreach \c [count=\x from 0] in {red!50!black, red!75!black, orange, yellow}{
  \colorlet{flame}{\c}
  \draw [decoration={flames, segment length=1.5cm-\x*0.125cm, amplitude=\x}, decorate] 
    circle [radius=15]
    (270:15) -- (54:15) -- (198:15) -- (342:15) -- (126:15) -- cycle;
}
\end{tikzpicture}
}
\end{document}

enter image description here