9

There are 5 white regions bounded by the ellipse and character R as shown in the following figure.

I want to fill EACH of these regions with a UNIQUE/DIFFERENT/DISTINGUISHABLE color.

How to do this in either PSTricks or TikZ?

enter image description here

\documentclass[border=0pt]{standalone}

\usepackage{pstricks}

\begin{document}
    \begin{pspicture}[showgrid=false](4,6)
        \begin{psclip}{\psellipse[linestyle=none](2,3)(2,3)}
            \rput(2,3){\psscalebox{21}{R}}
        \end{psclip}
        \psellipse(2,3)(2,3)
    \end{pspicture}
\end{document}
  1. Please don't suggest me to replace the character border with a new object by tracing it such as using \pscurve, \psbezier, or the like.

  2. Please don't suggest me to use a tool provided by vector or raster graphics editors as shown in the following screenshot.

    enter image description here

1 Answers1

13

enter image description here

You need to use a grid

  \draw[help lines,step=.2] (-1.4,-2) grid (1.4,2); 

To get

 \documentclass[11pt]{scrartcl}
 \usepackage{tikz}

 \begin{document}
 \begin{tikzpicture}
 \begin{scope}
     \draw[ultra thick] (0,0) ellipse[ x radius=1.2cm,y radius=2cm]  ;
     \clip (0,0) ellipse [x radius=1.2cm,y radius=2cm]  ;
     \fill[green] (0,0) ellipse [x radius=1.2cm,y radius=2cm]  ;      
     \fill[orange] (-1.4,-2) rectangle (-0.8,2);
     \fill[blue] (-1.4,1.5) -- (0.2,1.5) -- (1.2,0.8) -- (1.2,2) --(-1.2,2) -- cycle;
     \fill[yellow] (-0.75,1.5) -- (0.2,1.5) -- (0.8,1) -- (0.6,0.2) --(0.2,0) -- (-0.75,0) -- cycle; 
     \fill[magenta] (0.8,1) -- (0.6,0.2) --(0.2,0) -- (0.8,-0.8) -- (0.8,-1.4) -- (1.4,-1.4) -- (1.4,1) --cycle; 
     \node[scale=12,inner sep=0pt] {R};    
 \end{scope}
% \draw[help lines,step=.2] (-1.4,-2) grid (1.4,2);    
 \end{tikzpicture}
 \end{document}    

With the grid it's easy to define the five areas:

enter image description here

Alain Matthes
  • 95,075