# How can I draw a chord of a unit circle?

How can I draw this?

Here's what I've been able to do until now

\documentclass{report}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage[francais]{babel}
\usepackage{enumitem}
\usepackage{multicol}
\newcommand{\exercice}[1]{\noindent {\bf Exercice #1.}}

\begin{document}

\begin{flushleft}
\bf
D\'{e}partement de Math\'{e}matique.

Facult\'{e} des Sciences.

Tlemcen.
\end{flushleft}

\begin{flushright}
\bf
G\'{e}om\'{e}trie.

\textit{Semestre 4}
2016-2017

\end{flushright}
\begin{center}
\bf
\underline{Liste TD \No 1 :}

\end{center}
\exercice{1} Param\'{e}triser le cercle unit\'{e} (moins le pt $(0,1)$) par le param\'{e}tre $t$ (voir fig. 1) :

\begin{tikzpicture}
\draw (0,0) -- (0,2);
\draw (0,0) -- (0,-2);
\draw (0,0) -- (2,0);
\draw (0,0) -- (-2,0);

\draw (0,0) circle (2cm);
\end{tikzpicture}

\exercice{2}

\end{document}


It gives this

• Welcome to TeX.SE! Do you tray anything so far? Mar 2, 2017 at 21:33
• I only know how to draw a circle Mar 2, 2017 at 21:37
• Have you looked at the first tutorial in the TikZ manual? (I.e. chapter 2.) Mar 2, 2017 at 21:39
• not yet but I'm going to take a look at it now. thank you Mar 2, 2017 at 21:44
• The circle can be starting point. After it you need to draw lines for coordinate axis and show to us in your question what you do so far. Mar 2, 2017 at 22:05

I reduced your preamble to only the necessities for drawing the image. You can simply copy-paste the following code into your document. Don't forget to add the used TikZ libraries:

\documentclass[tikz, border=30pt]{standalone}
\usetikzlibrary{angles, quotes}

\begin{document}
\begin{tikzpicture}[
my angle/.style={draw, <->, angle eccentricity=1.3, angle radius=9mm}
]
% coordinate axis
\draw[<->] (-2.5,0) -- (2.5,0);
\draw[<->] (0,-2.5) -- (0,2.5);
% circle
\draw (0,0) circle (2cm);
% coordinates
\coordinate[pin= 60:{$( 1,0)$}] (A)  at ( 2,0);
\coordinate[pin=150:{$(0, 1)$}] (B)  at ( 0,2);
\coordinate[pin=240:{$(-1,0)$}] (C)  at (-2,0);
\coordinate[pin=300:{$(0,-1)$}] (D)  at (0,-2);
%
\coordinate[label=above:M]  (M) at (60:2);
\coordinate                 (O) at ( 0:0);
% angles
\draw[thick]    (M) -- (C)  (M) -- (O);
\pic[my angle, "$t$"]      {angle = A--C--M};
\pic[my angle, "$\theta$"] {angle = A--O--M};
\end{tikzpicture}
\end{document}


This is slightly modified (placement of coordinates, added arrows to axis lines).

Edit:

Slightly shorter alternative code for above image is:

\documentclass[tikz, border=30pt]{standalone}
\usetikzlibrary{angles, quotes}

\begin{document}
\begin{tikzpicture}[
my angle/.style={draw, <->, angle eccentricity=1.3, angle radius=9mm}
]
% coordinates
\coordinate                     (O)  at (0,0);
\coordinate[pin= 60:{$(1,0)$}]  (A)  at (2,0);
\coordinate[pin=150:{$(0,1)$}]  (B)  at (0,2);
\coordinate[pin=240:{$(-1,0)$}] (C)  at (-2,0);
\coordinate[pin=300:{$(0,-1)$}] (D)  at (0,-2);
% coordinate axis
\draw[<->, shorten >=-5mm, shorten <=-5mm]
(A) edge (C)    (B) edge (D);
% circle
\draw (0,0) circle (2cm);
% angles
\coordinate[label=above:M]  (M) at (60:2);
%
\draw[thick]    (M) -- (C)  (M) -- (O);
\pic[my angle, "$t$"]      {angle = A--C--M};
\pic[my angle, "$\theta$"] {angle = A--O--M};
\end{tikzpicture}
\end{document}

• It is very beautiful. Zarko excuse me for this observation. Is it possible to put - in mathmode and (1,0) without the space in 1? Mar 3, 2017 at 11:55
• @Sebastiano, of course. This is mistake to often happens to me :-( Mar 3, 2017 at 12:16

For fun: a simple code with pstricks:

\documentclass[border=5pt]{standalone}
\usepackage{pst-plot, pst-eucl, auto-pst-pdf}%
\usepackage{amsmath}

\begin{document}

\psset{unit=2cm, dotsize=2.5pt}

\begin{pspicture}(-1.6,-1.5)(1.5,1.5)
\psarc[linewidth=0.3pt, doubleline=true, doublesep=1.pt](O){0.2}{0}{50}\uput{3ex}[25](O){$\theta$}
\psaxes[ticks=none, labels=none](0,0)(-1,-1)(1,1)
\pscircle(0,0){1}
\pstGeonode[PointSymbol=*] (1;50){M}
\pnodes(0,0){O}(1,0){A}(-1,0){B}
\uput[r](1,0){$(1,0)$}\uput[l](-1,0){$(-1,0)$}
\uput[u](0,1){$(0,1)$}\uput[d](0,-1){$(0,-1)$}
\psline[arrows =-*](O)(M)
\psarc[linewidth=0.4pt](B){0.35}{0}{25}\uput{5ex}[12.5](B){$t$}
\psline(B)(M)
\end{pspicture}

\end{document}


• you beat me for 2 minutes, it seems that pstrick is faster than tikz :-). (+1) for nice sketch! Mar 2, 2017 at 22:46
• For me, it's essentially faster to code as it uses LaTeX commands. Mar 2, 2017 at 22:49

Here's a Metapost alternative. Compile with lualatex.

\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);

path C;
C = fullcircle scaled 144;

pair M;
M = point 1.1 of C;

draw C;
draw point 0 of C -- point 4 of C;
draw point 2 of C -- point 6 of C;

draw origin -- M;
draw point 4 of C -- M;

vardef angle_label(expr a,b,c,r,s) =
save arc; path arc;
arc = fullcircle scaled r
rotated angle (a-b)
shifted b
cutafter (b--c);
draw arc withpen pencircle scaled 1/4;
label(s,point 1/2 of arc shifted -b scaled (1+10/r) shifted b);
enddef;

angle_label(point 0 of C, point 4 of C, M, 45, textext("$t$"));
angle_label(point 0 of C, origin,       M, 30, textext("$\theta$"));

label.rt ("$(1,0)$", point 0 of C);
label.top("$(0,1)$", point 2 of C);
label.lft("$(-1,0)$", point 4 of C);
label.bot("$(0,-1)$", point 6 of C);

dotlabel.urt("$M$", M);

endfig;
\end{mplibcode}
\end{document}


And if you prefer the charming hand-drawn look of the original, you could load the "Euler" font, use a bit of colour, and draw the lines "freehand" with an extra macro.

\RequirePackage{luatex85}
\documentclass[border=5mm]{standalone}
\usepackage{luamplib}
\usepackage{euler}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
% freehand - draw a bit wobbly
newinternal freehand_randomness;
newinternal freehand_overshoot;
freehand_randomness := 2;
freehand_overshoot  := 4;
vardef freehand expr p =
if path p:
if cycle p:
for t=0 upto length p - 1:
point t of p
{ direction t of p rotated (freehand_randomness*normaldeviate) }
..
endfor cycle
else:
-freehand_overshoot*unitvector(direction 0 of p) shifted point 0 of p ..
for t=0 upto length p:
point t of p
{ direction t of p rotated (freehand_randomness*normaldeviate) }
..
endfor
+freehand_overshoot*unitvector(direction length p of p) shifted point length p of p
fi
fi
enddef;
% mark angle labels
vardef angle_label(expr a,b,c,r,s) =
save arc; path arc;
arc = fullcircle scaled r
rotated angle (a-b)
shifted b
cutafter (b--c);
draw arc withpen pencircle scaled 1/4 withcolor 3/4 red;
label(s,point arctime 1/2 arclength arc of arc of arc shifted -b scaled (1+10/r) shifted b);
enddef;
beginfig(1);

path C;
C = fullcircle scaled 144;

pair M;
M = point 1.1 of C;

draw C;
draw freehand point 0 of C -- origin -- point 4 of C;
draw freehand point 2 of C -- origin -- point 6 of C;

draw freehand origin -- M;
draw freehand point 4 of C -- M;

angle_label(point 0 of C, point 4 of C, M, 45, textext("$t$"));
angle_label(point 0 of C, origin,       M, 30, textext("$\theta$"));

labeloffset := 8;
dotlabel.urt("$M$", M);
drawoptions(withcolor 2/3 blue);
label.rt ("$(1,0)$", point 0 of C);
label.top("$(0,1)$", point 2 of C);
label.lft("$(-1,0)$", point 4 of C);
label.bot("$(0,-1)$", point 6 of C);
drawoptions();

endfig;
\end{mplibcode}
\end{document}

• +1 for the Euler font and the freehand! Oct 5, 2020 at 22:00