As usual I am typeseting some old exams. I ran into this image shown below
I ran into some problems when trying to tikz it up. In the minimal example below I have been able to almost recreate this image, but my method is very rough. I created a half circle, filled it. Then used some trickery with cutting the figure. My main problem is how do I fill a quarter circle? (preferably using tikz euclide) Now any help improving my figure would be greatly appreciated =)
\documentclass{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\def\a{3} % Defines the radius for the half circle
\tkzInit[xmin=-.5,xmax=4,ymin=-.5,ymax=4] \tkzClip
\tkzDefPoint(0,0){O} \tkzDefPoint(\a,0){S1} \tkzDefPoint(0,\a){S2}
\tkzDefPoint(-\a,0){S3} \tkzDefPoint(0,-\a){S4}
\tkzDefPointBy[rotation= center O angle 45](S1) \tkzGetPoint{B}
\tkzDefPoint(\a*2^(-0.5),0){A} \tkzDefPoint(0,\a*2^(-0.5)){C}
\tkzDrawArc[fill=blue,opacity=0.3,ultra thin](O,S1)(S3)
\tkzDrawArc[color=blue,very thick](O,S1)(S2)
\tkzDrawSquare[fill=white,color=white](S3,O)
\tkzDrawSquare[fill=white](O,A) \tkzDrawSquare[thick](O,A)
\tkzDefPoint(-0.5,0){x1} \tkzDefPoint[label=above left: $x$](1+\a,0){x2}
\tkzDefPoint(0,-0.5){y1} \tkzDefPoint[label=below left: $y$](0,1+\a){y2}
\tkzDrawSegments[very thick,-stealth](x1,x2 y1,y2) \tkzDrawSegment[dashed](A,C)
\tkzDrawSegments[ultra thick,white]({-0.5,-0.5},{-0.5,4})
\tkzDrawPoints[fill=black,size=2.5](O,A,B,C)
\tkzLabelPoints[below left](O) \tkzLabelPoints[above right](B)
\tkzLabelPoints[below](A) \tkzLabelPoints[left](C)
\tkzLabelPoint[below](S1){$3$} \tkzLabelPoint[left](S2){$3$}
\end{tikzpicture}
\end{document}
EDIT: New MWE
\documentclass{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\def\a{3} % Defines the radius and clipping.
\tkzInit[xmin=-.5,xmax=4,ymin=-.5,ymax=4] \tkzClip
% Defines all the neccecary points.
\tkzDefPoint(0,0){O} \tkzDefPoint(\a,0){S1} \tkzDefPoint(0,\a){S2}
\tkzDefPointBy[rotation= center O angle 45](S1) \tkzGetPoint{B}
\tkzDefPoint(\a*2^(-0.5),0){A} \tkzDefPoint(0,\a*2^(-0.5)){C}
% Draws the quarter cirle. (triangle + arc)
\tkzDrawPolygon[fill=blue,opacity=0.3,color=blue](O,S1,S2)
\tkzDrawArc[fill=blue,opacity=0.3,ultra thin](O,S1)(S2)
\tkzDrawArc[color=blue,very thick](O,S1)(S2) \tkzDrawSegment[color=blue!30!white](S1,S2)
% Draws the square and the dashed line.
\tkzDrawSquare[color=black,thick,fill=white](O,A) \tkzDrawSegment[dashed](A,C)
% Draws the coordinate axis.
\tkzDefPoint(-0.5,0){x1} \tkzDefPoint[label=above left: $x$](1+\a,0){x2}
\tkzDefPoint(0,-0.5){y1} \tkzDefPoint[label=below left: $y$](0,1+\a){y2}
\tkzDrawSegments[very thick,-stealth](x1,x2 y1,y2)
% Draws the points and label them.
\tkzDrawPoints[fill=black,size=2.5](O,A,B,C)
\tkzLabelPoints[below left](O) \tkzLabelPoints[above right](B)
\tkzLabelPoints[below](A) \tkzLabelPoints[left](C)
\tkzLabelPoint[below](S1){$3$} \tkzLabelPoint[left](S2){$3$}
\end{tikzpicture}
\end{document}
Best Answer
tkz-euclide
manual, although is written in french, is full of examples. On page 112 you will find command\tkzFillSector
. Whitin your first example you can use\tkzFillSector[fill=blue,opacity=0.3](O,S1)(S2)
to fill the sector with center onO
fromS1
toS2
.