# How can I get a tangent to a circle in a point with tkz-euclide?

I would like to re-create the image

The idea is to create the circle first, then define 5 different points on that circle, calculate the tangents and finally calculate the intersections of the tangets (A, B, C, D, E).

However, I have difficulties to get the tangents.

Here is what I have so far:

\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{shapes, calc, decorations}
\usepackage{amsmath,amssymb}
\usepackage{helvet}
\usepackage[eulergreek]{sansmath}

\begin{document}
\begin{preview}
\begin{tikzpicture}[very thick,font=\sansmath\sffamily]
\tkzDefPoint(0, 0){C}
\tkzDrawCircle[R](C,3cm)

\tkzDefPoint( 30:3){BCT}
\tkzDefPoint( 90:3){CDT}
\tkzDefPoint(135:3){DET}
\tkzDefPoint(215:3){EAT}
\tkzDefPoint(315:3){ABT}

\tkzLabelPoints[below left,font=\sansmath\sffamily](BCT)

\tkzDrawPolygon[thick](BCT,CDT,DET,EAT,ABT)

% \tkzTangent[from=EAT](C, R)\tkzGetPoints{e}{f} % Doesn't work
% \tkzDrawSegments[color=red](e,f)
\tkzDrawPoints(BCT,CDT,DET,EAT,ABT)  % remove after finishing
\tkzLabelPoints[below left,font=\sansmath\sffamily](BCT,CDT,DET,EAT,ABT)  % remove after finishing

% Draw points
% \tkzLabelPoints[below left,font=\sansmath\sffamily](A)
% \tkzLabelPoints[below right,font=\sansmath\sffamily](B)
% \tkzLabelPoints[above right,font=\sansmath\sffamily](C)
% \tkzLabelPoints[above left,font=\sansmath\sffamily](D)
% \tkzLabelPoints[left,font=\sansmath\sffamily](E)

% % Draw polygon
% \tkzDrawPolygon[thick](A,B,C,D,E)
\end{tikzpicture}
\end{preview}
\end{document}


How can I get the tangent to a circle in a given point on the circle with tkz-euclide?

## What I've tried

I've tried a lot of variants.

The following does compile, but does not show anything:

\tkzTangent[from with R = EAT](C, 3 cm)\tkzGetPoints{e}{f}
\tkzDrawLine[color=red](e,f)

• The tangent is perpendicular to the radius, so \usetikzlibrary{calc} and use ($(BCD)!1!90:(C)$)--($(BCD)!1!-90:(C)$) for the tangent. Commented Dec 5, 2014 at 20:41
• @JohnKormylo: Thank you! I've posted a complete solution below. Commented Dec 7, 2014 at 8:14

Thanks to John Kormylo, I thought about using my geometry knowledge: A tangent to a circle is simply a perpendicular through a diameter of the circle in a point on the circle. Although this solves my problem, I am still interested in getting \tkzTangent to work.

## Complete Code

\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usetikzlibrary{shapes, calc, decorations}
\usepackage{amsmath,amssymb}
\usepackage{helvet}
\usepackage[eulergreek]{sansmath}

\begin{document}
\begin{preview}
\begin{tikzpicture}[very thick,font=\sansmath\sffamily]
\tkzDefPoint(0, 0){CircleCenter}
\tkzDrawCircle[R](CircleCenter,3cm)

% Define 5 points on a circle
\tkzDefPoint( 30:3){BCT}
\tkzDefPoint( 90:3){CDT}
\tkzDefPoint(135:3){DET}
\tkzDefPoint(215:3){EAT}
\tkzDefPoint(300:3){ABT}

% Tangents
\tkzDefLine[perpendicular=through EAT](CircleCenter,EAT)\tkzGetPoint{EAT2}
\tkzDefLine[perpendicular=through BCT](CircleCenter,BCT)\tkzGetPoint{BCT2}
\tkzDefLine[perpendicular=through CDT](CircleCenter,CDT)\tkzGetPoint{CDT2}
\tkzDefLine[perpendicular=through DET](CircleCenter,DET)\tkzGetPoint{DET2}
\tkzDefLine[perpendicular=through ABT](CircleCenter,ABT)\tkzGetPoint{ABT2}

% Find the points by intersecting the tangents
\tkzInterLL(EAT,EAT2)(ABT,ABT2)\tkzGetPoint{A}
\tkzInterLL(ABT,ABT2)(BCT,BCT2)\tkzGetPoint{B}
\tkzInterLL(BCT,BCT2)(CDT,CDT2)\tkzGetPoint{C}
\tkzInterLL(CDT,CDT2)(DET,DET2)\tkzGetPoint{D}
\tkzInterLL(DET,DET2)(EAT,EAT2)\tkzGetPoint{E}

% Background
\tkzDrawPolygon[thick,fill=gray!10](A,B,C,D,E)

\tkzDrawSegments(CircleCenter,EAT CircleCenter,BCT CircleCenter,CDT CircleCenter,DET CircleCenter,ABT)

% Draw points
\tkzDrawPoints[size=1pt](A,B,C,D,E)
\tkzDrawCircle[R,thick,draw=red](CircleCenter,3cm)
\tkzLabelPoints[below left,font=\sansmath\sffamily](A)
\tkzLabelPoints[below right,font=\sansmath\sffamily](B)
\tkzLabelPoints[above right,font=\sansmath\sffamily](C)
\tkzLabelPoints[above left,font=\sansmath\sffamily](D)
\tkzLabelPoints[left,font=\sansmath\sffamily](E)

% % Draw polygon
\tkzDrawPolygon[very thick](A,B,C,D,E)
\end{tikzpicture}
\end{preview}
\end{document}


## Commons

File:Pentagon-inscribed-circle.svg