Actually a question. I can not find a simple and elegant answer. The use of arcs makes me despondent.

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

        \draw[name path=circles] (0,0) circle (4 and 2) circle (3 and 1);
        \path[name path=line1] (0,0) -- (10:5);
        \path[name path=line2] (0,0) -- (-10:5);
        \draw[name intersections={of=circles and line1}] (0,0) -- (intersection-1);
        \draw[name intersections={of=circles and line2}] (0,0) -- (intersection-1);

enter image description here

2 Answers 2

\documentclass[tikz, border=1cm]{standalone}
\clip  (0,0) -- (10:5) -- (-10:5) -- cycle;
\fill[pink, even odd rule] (0,0) ellipse[x radius=4, y radius=2] ellipse[x radius=3, y radius=1];
\draw (0,0) ellipse[x radius=4, y radius=2] ellipse[x radius=3, y radius=1];
\draw (0,0) -- (10:5) (0,0) -- (-10:5);

Two concentric ellipses with filled section


Here's an answer using the spath3 library, which works by splitting the elliptical and line paths where they intersect and then constructing a new path by welding together pieces of the resulting paths.


\path[spath/save=circles] (0,0)
circle[x radius=4, y radius=2]
circle[x radius=3, y radius=1]
% the overlay key means that these don't add to the picture size,
% also, a single path here simplifies the code later
\path[spath/save=lines,overlay] (10:5) -- (0,0) -- (-10:5);

% split the paths where they overlap each other
  spath/split at intersections={circles}{lines},
  % save the components of the paths
  spath/get components of={circles}\circlesCpts,
  spath/get components of={lines}\linesCpts,

  % takes a little experimenting to get the order right ...

% draw the ellipses now so that they are over the top of the
% filled region
\draw[ultra thick, spath/use={circles}];


Region filled as requested in the question

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.