#help
6 messages · Page 1 of 1 (latest)
cos θ is the x-coordinate of point A on the unit circle x² + y² = 1.
,tikz[scale=3, seglen/.style={font=\small}]
\pgfmathsetmacro\t{57} % angle t in DEGREES
\coordinate[label=below left:$O$] (O) at (0, 0);
\coordinate[label=below:$H$] (H) at ({cos(\t)}, 0);
\coordinate[label=above:$A$] (A) at ({cos(\t)}, {sin(\t)});
\coordinate[label=below right:$E$] (E) at (1, 0);
\coordinate[label=above right:$T$] (T) at (1, {tan(\t)});
\draw (O) circle (1);
% axes
\draw[->] (-1.3, 0) -- (1.3, 0) node [right]{$x$};
\draw[->] (0, -1.3) -- (0, 1.3) node [above]{$y$};
\begin{scope}[thick]
% colored sides
\draw[blue!40] (O) -- (H) node [below, midway, seglen] {$\cos \theta$};
\draw[red!40] (H) -- (A) node [below, midway, sloped, seglen] {$\sin \theta$};
\draw[green] (E) -- (T) node [below, midway, sloped, seglen] {$\tan \theta$};
% angle decorations
\draw pic[seglen, draw, "$\theta$", angle radius=0.3cm, angle eccentricity=1.8] {angle=H--O--A};
\draw (H) rectangle ++(-0.05, 0.05);
\draw (E) rectangle ++(-0.05, 0.05);
\end{scope}
% hypotenuse
\draw (O) -- (A) node [above left, midway] {$1$}
-- (T);
% node with theta in degrees
\node[draw, anchor=north west] at (current bounding box.north west) {$\theta = \t\degree$};
vin100
when 90° < θ < 270°, ..., H is on the negative x-axis, so ...