I'm trying to re-create a diagram from a textbook, which has various regions defined by polynomials. Ideally I'd like to fill them with the correct colours, to match the text that goes with it.
While I can create and fill the five 'shapes', I'm so far unable to fill the remainder of the background, without also re-filling the other regions (with the exception of the central circle).
Is there an (easy) way to do this? Or do I need to re-think the diagram entirely?
\documentclass[tikz,border=12pt,svgnames]{standalone}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,x=0.5cm,y=0.5cm,thin,samples=100,fill opacity=0.5]
\draw[help lines,step=0.5cm] (0,0) grid (14,8);
\draw[fill=red,domain=0:5] plot(\x,{-(1/3)*(\x+1)*(\x-5)}) |- (5,0) -- (0,0) -- cycle;
\draw[fill=Green,domain=10:14] plot(\x,{((\x-12)^3)/4+2}) |- (14,0) -- (10,0) -- cycle;
\draw[fill=Blue,domain=0:4] plot(\x,{((\x-2)^3)/4+6}) |- (4,8) -- (0,8) -- cycle;
\draw[fill=black,domain=9:14] plot(\x,{(\x-9)*(\x-15)/3+8}) |- (14,8) -- (9,8) -- cycle;
\draw[fill=Green,domain=9:14] (7,4) circle (3);
\draw[fill=pink,even odd rule,domain=9:14] (0,0) rectangle (14,8) (7,4) circle (3);
\end{tikzpicture}
\end{document}