I have re-written some code I wrote 3 months ago from here Filling between an ellipse and a line
However, I cant fill in the smaller triangle no matter what I try.
What I have tried so far is:
\begin{scope}
\clip (S) -- (F) -- (V) -- (S);
\filldraw[bottom color = cyan!50!blue, top color = green!20]
(S) -- (F) -- (V) -- (S);
\end{scope}
and
\begin{scope}
\clip (S) -- (F) -- (V) -- cycle;
\filldraw[bottom color = cyan!50!blue, top color = green!20]
(S) -- (F) -- (V) -- (S);
\end{scope}
and
\begin{scope}
\clip (S) -- (F) -- (V) -- cycle;
\filldraw[bottom color = cyan!50!blue, top color = green!20]
(S) rectangle (V) -- (S);
\end{scope}
I have tried more but I am not going to list them all. The new code is:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cal, intersections, arrows}
\begin{document}
\begin{tikzpicture}[
every label/.append style = {font = \small},
dot/.style = {outer sep = +0pt, inner sep = +0pt, shape = circle,
draw = black, label = {#1}},
small dot/.style = {minimum size = .05cm, dot = {#1}},
big dot/.style = {minimum size = .1cm, dot = {#1}},
extended line/.style = {shorten >=-#1, shorten <=-#1},
extended line/.default = 1cm,
one end extended/.style = {shorten >=-#1},
one end extended/.default = 1.25cm, line cap = round, line join = round,
>=triangle 45]
\pgfmathsetmacro{\a}{3}
\pgfmathsetmacro{\b}{2.5}
\pgfmathsetmacro{\c}{sqrt(\a^2 - \b^2)}
\node[fill = black, big dot = {below left: \(A\)}] (A) at (-3, 0) {};
\node[fill = black, big dot = {below right: \(P\)}] (P) at (3, 0) {};
\node[fill = black, big dot = {below left: \(D\)}] (D) at (0, -2.5) {};
\node[fill = black, big dot = {above left: \(B\)}] (B) at (0, 2.5) {};
\node[fill = black, big dot = {below left: \(F\)}] (F) at (\c, 0) {};
\node[fill = black, big dot = {below left: \(O\)}] (O) at (0,0) {};
\draw (0, -3.25) -- (0, 3.25) node[scale = .75, fill = white,
inner sep = 0cm, pos = .7] {\(b\)};
\draw[name path = xline] (-3.25, 0) -- (5, 0) node[scale = .8, fill = white,
inner sep = 0cm, pos = .2] {\(a\)};
\draw[red, name path = circle] (O) circle (3cm);
\draw[blue, name path = ellipse] (O) ellipse (3cm and 2.5cm);
\path[name path = line] (2.25, 3) -- (2.25, -1);
\path[name intersections = {of = circle and line, by = P1}];
\node[fill = black, big dot = {above: \(Q\)}] (Q) at (P1) {};
\path[name intersections = {of = line and xline, by = P2}];
\draw[black] (Q) -- (P2) node[fill = black, big dot = {below right: \(V\)}]
(V) at (P2) {};
\path[name intersections = {of = line and ellipse, by = P3}];
\node[fill = black, big dot = {right: \(S\)}] (S) at (P3) {};
\draw (O) -- (Q) node[scale = .75, pos = .5, fill = white, inner sep = 0cm]
{\(a\)};
\draw[one end extended] (F) -- (S) node[scale = .8, pos = .5,
fill = white, inner sep = 0.03cm] {\(r\)};
\begin{scope}
\clip (S) rectangle (P);
\shadedraw[blue, outer color = blue!30!black, inner color = red!30]
(O) ellipse (3cm and 2.5cm);
\end{scope}
\end{tikzpicture}
\end{document}

So no matter what I do, I cant fill in (S) -- (F) -- (V) -- cycle


.centerdo that corrects the problem. – dustin Jun 28 '13 at 22:43.centerpart chooses thecenteranchor of the node, thus a coordinate and not a node. See my answer. – Qrrbrbirlbel Jun 28 '13 at 22:54