TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am able to draw a simple circle.

\documentclass{minimal}
\usepackage{tikz}
\usepgflibrary{shapes}
\begin{document}
\begin{tikzpicture}
\draw (10,0) circle (3cm);
\end{tikzpicture}
\end{document}

But when I come across the following figures I face some difficulties.

enter image description here

Please provide some guidance so I can move ahead.

share|improve this question
    
Have you tried anything yet? Perhaps you can had the code you used to draw a simple circle first ;-) – Romain Picot Jan 4 at 9:06
    
\documentclass{minimal} \usepackage{tikz} \usepgflibrary{shapes} \begin{document} \begin{tikzpicture} \draw (10,0) circle (3cm); \end{tikzpicture} \end{document} – snehal Jan 4 at 9:09
    
This is what i made it was quit easy that is why i didn't give code. – snehal Jan 4 at 9:10
\documentclass[tikz,border=2mm]{standalone}
\usepackage{lmodern}

\begin{document}
\begin{tikzpicture}[draw=blue!70,thick]
\filldraw[fill=blue!40] circle (2.5cm);
\filldraw[fill=white] 
     (320:2.5cm) node[right] {Q} 
  -- (220:2.5cm) node[left] {P} 
  arc[start angle=220, end angle=320, radius=2.5cm] 
  -- cycle;
\node {Major Segment};
\node at (-90:2) {Minor Segment};

\begin{scope}[xshift=6cm]
\draw circle (2.5cm);
\filldraw[fill=blue!40] 
     (320:2.5cm) node[right] {Q}
  -- (0,0) node[above] {O}
  -- (220:2.5cm) node[left] {P} 
  arc[start angle=220, end angle=320, radius=2.5cm]
  -- cycle;
\node at (90:1cm) {Major Sector};
\node at (-90:1.5) {Minor Sector};
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
    
The second picture is inverted. :P – Alenanno Jan 4 at 9:48
    
Excellent. Thanks a lot.......... – snehal Jan 4 at 9:50
    
@Alenanno: Thanks for pointing it. I've corrected it. – Ignasi Jan 4 at 10:07

One way to do it with MetaPost, for whom it may interest. To be run with LuaLaTeX.

\documentclass[border=2mm]{standalone}
\usepackage{luamplib}
  \mplibtextextlabel{enable}
  \everymplib{verbatimtex \leavevmode etex;
    u = 2.5cm;
    path circle; circle = fullcircle scaled 2u;
    pair P, Q; P = u*dir 220; Q = u*dir 320; 
    beginfig(0);}
  \everyendmplib{
      draw circle;
      label.llft("$P$", P); 
      label.lrt("$Q$", Q);
    endfig;}
\begin{document}
  \begin{mplibcode}
    fill buildcycle(P--Q, circle rotated -90) withcolor 0.20[white,blue];
    draw P--Q;
    label("Major Segment", origin);
    label.bot("Minor Segment", .5[P,Q]);
  \end{mplibcode}
  \qquad
  \begin{mplibcode}
    fill buildcycle(Q--origin--P, circle) withcolor 0.20[white,blue];
    draw P--origin--Q;
    label.top("$O$", origin);
    label.top("Minor sector", .5[P,Q]); 
    label("Major sector", (0, .5u));
  \end{mplibcode}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.