[Tex/LaTex] Drawing the unit circle on the R^2 plane and some extra features

tikz-pgf

So I am trying to replicate the following image in latex.
The following are what I am finding hard to achieve:

  1. how do you draw a little hollow circle to mean we have right-angled triangle like the image I am trying to copy?
  2. how do you draw a red circular arrow starting from the x-axis to the hypotenius of the triangle like the image?
  3. Why is the circle broken around the x-axis?

Many thanks guys

\documentclass[11.5pt]{article}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\sectionmark}[1]{\markright{#1}} %Gets rid of section number in the header%
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[margin=0.5in]{geometry}
\usepackage{pgfplots}
\usepackage{array}
\usepackage{float}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{bigints}
\usepgfplotslibrary{fillbetween}
\usepackage{subcaption}
\usepackage{pstricks}
\usepackage{fancyheadings}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage{blindtext} %% to add dummy text
\renewcommand{\contentsname}{Table Of Contents}%
\begin{document}
\setlength{\parindent}{0cm}

\pgfplotsset{every axis/.append style={
        axis x line=middle,    % put the x axis in the middle
        axis y line=middle,    % put the y axis in the middle
        axis line style={<->}, % arrows on the axis
        xlabel={$x$},          % default put x on x-axis
        ylabel={$y$},   % default put y on y-axis
        title={$ $},
        ticks=none
    }}
    % arrows as stealth fighters
    \tikzset{>=stealth}
    \begin{center}
        \begin{tikzpicture}
        \begin{axis}[
        xmin=-3,xmax=3,
        ymin=-2.5,ymax=2.5,
        ]
        \node [below] at (axis cs: 0.2, 0) {$O$};
        \node [left] at (axis cs: -1.5, 1.3228) {$P$};
        \node [below] at (axis cs: -0.7, 0) {$x$};
        \node [left] at (axis cs: -1.5, 0.6) {$y$};
        \node [above] at (axis cs: -0.7, 0.7) {$r$};
        \node [right] at (axis cs: 0, 0.2) {$\theta$};
        \plot[thick][samples=200,domain=-2.3:2.3] {sqrt(4-x^2)};    
        \plot[thick][samples=200,domain=-2.3:2.3] {-sqrt(4-x^2)};
        \plot[ultra thick][samples=200,domain=-1.5:0] {0};
        \plot[ultra thick][samples=200,domain=-1.5:0] {-0.881866*x};
        \draw[style=ultra thick](axis cs:-1.5,0) -- (axis cs:-1.5,1.3228);
        \end{axis}
        \end{tikzpicture}
    \end{center}
\end{document}

what I need to draw in Latex

Best Answer

From scratch

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{angles,patterns,calc}
\begin{document}

\centering

\begin{tikzpicture}
  \tikzset{>=stealth}
  % draw axis and labels. We store a single coordinate to have the
  % direction of the x axis
  \draw[->] (-4,0) -- ++(8,0) coordinate (X) node[below] {$x$};
  \draw[->] (0,-4) -- ++(0,8) node[left] {$y$};

  \newcommand\CircleRadius{3cm}
  \draw (0,0) circle (\CircleRadius);
  % special method of noting the position of a point
  \coordinate (P) at (140:\CircleRadius);

  \draw[very thick,pattern=dots] 
  (0,0) 
  coordinate (O) % store origin
  node[below right] {$O$} % label
  -- 
  node[above left,pos=1] {$P(x,y)$} % some labels
  node[above right,midway] {$r$}
  (P) 
  -- 
  node[midway,left] {$y$}
  (P |- O) coordinate (Px) % projection onto horizontal line through
                           % O, saved for later
  -- 
  node[midway,below] {$x$}
  cycle % closed path
  % pic trick is from the angles library, requires the three points of
  % the marked angle to be named
  pic [draw,red,->,angle radius=1cm,pic text=$\theta$,
  angle eccentricity=1.3] {angle=X--O--P};

  % right angle marker
  \draw ($(Px)+(0.3,0)$) -- ++(0,0.3) -- ++(-0.3,0);
  
\end{tikzpicture}

\end{document}

enter image description here