6

I need to draw an arc with a start radius different from the end radius. My drawing is as follow (adapted from one that I found here) and I need fill some regions between the irregular arc and the most external circle.

enter image description here

\documentclass[12pt]{article}
 \usepackage[x11names]{xcolor}                     %Additional colors
 \usepackage{tikz}

   \begin{document}
   \thispagestyle{empty} %Please, no page numbers or similar
    \begin{center}
      \begin{tikzpicture}[scale=0.8]
        %Circles 
        \foreach \r in {1, 2,...,9}
          \draw[SteelBlue3, thick] (0,0) circle (\r);    
        \foreach \r in {0.5, 1.5,...,9}
          \draw[Azure4, thin] (0,0) circle (\r);
        %1° Rays
        \foreach \a in {0, 1,...,359}
        \draw[Azure4] (\a:9.2) -- (\a:9.5);
        %5° Rays
        \foreach \a in {0, 5,...,355}
        \draw[Azure4] (\a:9) -- (\a:9.5);      
        %15° Rays
        \foreach \a in {0, 15,...,355}
        \draw[thick,Azure4] (\a:1) -- (\a:9.5); 
        %30° Rays
        \foreach \a in {0, 30,...,359}
          \draw[thick,Azure4] (0, 0) -- (\a:9.5);
        %Radius labels (background filled white)
        \edef\mya{0}
        \foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
        \draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
        %Main rays
        \foreach \a in {0, 90,...,359}
          \draw[very thick] (0, 0) -- (\a:9.5);
        %Angle labels  
        \foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
          \draw (\a: 10) node {$\mya^\circ$};

      \end{tikzpicture}
    \end{center}


   \end{document}
3
  • 1
    Welcome! Could you complete your code with the required preamble?
    – cfr
    Commented Jul 16, 2015 at 2:07
  • I tried to edit your question so that the link "here" would work but it seems to be missing. Could you add this? I formatted the code for you. To do this, highlight and use the {} button or hit ctrl+k.
    – cfr
    Commented Jul 16, 2015 at 2:23
  • I just add the preamble as you asked me. Thanks. Commented Jul 18, 2015 at 0:58

2 Answers 2

7

Two options.

  1. Using two arcs:

    enter image description here

    The code:

    \documentclass[dvipsnames,svgnames,x11names]{article}
    \usepackage{tikz}
    \usetikzlibrary{backgrounds}
    
      \begin{document}
       \thispagestyle{empty} %Please, no page numbers or similar
        \begin{center}
          \begin{tikzpicture}[scale=0.8]
            %Circles 
            \foreach \r in {1, 2,...,9}
              \draw[SteelBlue3, thick] (0,0) circle (\r);
            \foreach \r in {0.5, 1.5,...,9}
              \draw[Azure4, thin] (0,0) circle (\r);
            %1° Rays
            \foreach \a in {0, 1,...,359}
            \draw[Azure4] (\a:9.2) -- (\a:9.5);
            %5° Rays
            \foreach \a in {0, 5,...,355}
            \draw[Azure4] (\a:9) -- (\a:9.5);      
           % The irregular arc
            \begin{pgfonlayer}{background}
            \fill[MediumOrchid1] 
              (0,9) arc [start angle=90,end angle=60,radius=9] -- ++(60:-0.5cm)
              arc [start angle=60,end angle=102,radius=6] -- cycle;      
            \draw[red,thick]
              (60:8.5cm) arc [start angle=60,end angle=102,radius=6];
            \end{pgfonlayer}  
            %15° Rays
            \foreach \a in {0, 15,...,355}
            \draw[thick,Azure4] (\a:1) -- (\a:9.5); 
            %30° Rays
            \foreach \a in {0, 30,...,359}
              \draw[thick,Azure4] (0, 0) -- (\a:9.5);
            %Radius labels (background filled white)
            \edef\mya{0}
            \foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
            \draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
            %Main rays
            \foreach \a in {0, 90,...,359}
              \draw[very thick] (0, 0) -- (\a:9.5);
            %Angle labels  
            \foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
              \draw (\a: 10) node {$\mya^\circ$};
          \end{tikzpicture}
        \end{center}
    
    
       \end{document}
    
  2. Using one arc for the outer arc and bend right for the inner one:

enter image description here

The code:

    \documentclass[dvipsnames,svgnames,x11names]{article}
    \usepackage{tikz}
    \usetikzlibrary{backgrounds}

      \begin{document}
       \thispagestyle{empty} %Please, no page numbers or similar
        \begin{center}
          \begin{tikzpicture}[scale=0.8]
            %Circles 
            \foreach \r in {1, 2,...,9}
              \draw[SteelBlue3, thick] (0,0) circle (\r);
            \foreach \r in {0.5, 1.5,...,9}
              \draw[Azure4, thin] (0,0) circle (\r);
            %1° Rays
            \foreach \a in {0, 1,...,359}
            \draw[Azure4] (\a:9.2) -- (\a:9.5);
            %5° Rays
            \foreach \a in {0, 5,...,355}
            \draw[Azure4] (\a:9) -- (\a:9.5);      
           % The irregular arc
            \begin{pgfonlayer}{background}
            \fill[MediumOrchid1] 
              (0,9) arc [start angle=90,end angle=60,radius=9] -- ++(60:-0.65cm)
              to[bend right=15] (90:8cm) -- cycle;      
            \draw[red,thick]
              (60:8.35cm) to[bend right=15] (90:8cm);
            \end{pgfonlayer}  
            %15° Rays
            \foreach \a in {0, 15,...,355}
            \draw[thick,Azure4] (\a:1) -- (\a:9.5); 
            %30° Rays
            \foreach \a in {0, 30,...,359}
              \draw[thick,Azure4] (0, 0) -- (\a:9.5);
            %Radius labels (background filled white)
            \edef\mya{0}
            \foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
            \draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
            %Main rays
            \foreach \a in {0, 90,...,359}
              \draw[very thick] (0, 0) -- (\a:9.5);
            %Angle labels  
            \foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
              \draw (\a: 10) node {$\mya^\circ$};
          \end{tikzpicture}
        \end{center}


       \end{document}
1
  • (+1) I see you're starting to abandon "pulling the paths" :)
    – cfr
    Commented Jul 16, 2015 at 2:48
5

Perhaps?

\PassOptionsToPackage{rgb,svgnames,dvipsnames,x11names}{xcolor}
\documentclass[tikz,border=5pt,multi]{standalone}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}[scale=0.8]
  %Circles
  \foreach \r in {1, 2,...,9}
  \draw[SteelBlue3, thick] (0,0) circle (\r);
  \foreach \r in {0.5, 1.5,...,9}
  \draw[Azure4, thin] (0,0) circle (\r);
  %1° Rays
  \foreach \a in {0, 1,...,359}
  \draw[Azure4] (\a:9.2) -- (\a:9.5);
  %5° Rays
  \foreach \a in {0, 5,...,355}
  \draw[Azure4] (\a:9) -- (\a:9.5);
  %15° Rays
  \foreach \a in {0, 15,...,355}
  \draw[thick,Azure4] (\a:1) -- (\a:9.5);
  %30° Rays
  \foreach \a in {0, 30,...,359}
  \draw[thick,Azure4] (0, 0) -- (\a:9.5);
  %Radius labels (background filled white)
  \edef\mya{0}
  \foreach \r [evaluate=\r as \mya using int(100-(\r+1)*10)] in {1,2,...,8}
  \draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white] {$\mya^\circ$};
  %Main rays
  \foreach \a in {0, 90,...,359}
  \draw[very thick] (0, 0) -- (\a:9.5);
  %Angle labels
  \foreach \a [evaluate=\a as \mya using int(90 - \a )] in {90, 75,...,-269}
  \draw (\a: 10) node {$\mya^\circ$};
  \scoped[on background layer]{\draw [fill=blue!20] (90:8) -- (90:9) arc (90:75:9) -- (75:8.25) .. controls (82.5:8.15) .. cycle;}
  \draw [draw=red] (75:8.25) .. controls (82.5:8.15) .. (90:8);
\end{tikzpicture}
\end{document}

draw and fill

3
  • +1. I see that you're starting to like "pulling the paths" :) Commented Jul 16, 2015 at 2:34
  • @GonzaloMedina Thought I'd practise as I couldn't get it to look right easily with the other syntax. ('right' being 'like in the target image')
    – cfr
    Commented Jul 16, 2015 at 2:46
  • Thanks to both of you, Gonzalo and cfr. Now I have more then "one" choice. The sugestions worked perfectly. Thanks. Commented Jul 18, 2015 at 1:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .