# Example: Conics - Polars and Tangents

Published 2012-05-01 | Author: Hugues Vermeiren

The projective construction of polars and tangents to an ellipse from an external point. See http://mathworld.wolfram.com/Polar.html and Projective Geometry, H.S.M. Coxeter, Springer-Verlag,1987, page 75.

This example shows how to use the intersection library for such constructions.

Do you have a question regarding this example, TikZ or LaTeX in general? Just ask in the LaTeX Forum.
Oder frag auf Deutsch auf TeXwelt.de. En français: TeXnique.fr.

% Conics: The projective construction of polars and  tangents
% Author: Hugues Vermeiren
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\begin{document}
\begin{tikzpicture}[scale=1.2]
\tikzset{mypoints/.style={fill=white,draw=black,thick}}
\def\ptsize{2.0pt}
\def\a{3} \def\b{1.75}
% warning: construction fails if xp<0 or yp<=0
\def\xp{4.0} \def\yp{3.5}
\def\i{0.85} \def\j{-0.25}%determines rays from P
\coordinate[label=above:P] (P) at (\xp,\yp);
\coordinate (M) at ({\a*\i},0);
\coordinate (N) at ({\a*\j},0);
\coordinate (AA) at (0,-\b);
\coordinate (BB) at (1,-\b);
\coordinate (CC) at (-\a,0);
\coordinate (DD) at (-\a,1);
\coordinate (Q) at (intersection of P--N and AA--BB);
\coordinate (R) at (intersection of P--M and AA--BB);
\draw[name path=ellipse,red,very thick]
\path[name path=linePQ,blue] (P)--(Q);
\path[name path=linePR,green] (P)--(R);
\path [name intersections={of = ellipse and linePQ}];
\coordinate[label=above:A] (A)  at (intersection-1);
\coordinate[label=below left:B] (B) at (intersection-2);
\path [name intersections={of = ellipse and linePR}];
\coordinate[label=above right:C] (C)  at (intersection-1);
\coordinate[label=above left:D] (D) at (intersection-2);
\draw (B)--(P)--(D) (A)--(D) (C)--(B);
\coordinate [label=below left:E] (E) at (intersection of A--D and B--C);
\coordinate[label=above right:F] (F) at (intersection of A--C and B--D);
\coordinate (G) at (intersection of E--F and CC--DD);
\draw [name path=lineFG,blue,thick] (F)--(G);
\draw (A)--(F)--(B);
\path [name intersections={of = ellipse and lineFG}];
\coordinate[label=above:X] (X) at (intersection-1);
\coordinate[label=above right:Y] (Y) at (intersection-2);
\coordinate (XX) at ($(P)!1.5!(X)$);
\coordinate (YY) at ($(P)!1.5!(Y)$);
\draw[very thick,green!50!black!50] (XX)--(P)--(YY);
\foreach \p in {A,B,C,D,E,F,P,X,Y}
\fill[mypoints] (\p) circle (\ptsize);
\end{tikzpicture}
\end{document} 