You can approximate the tangent by placing a very small circle path around your tangent point and finding the intersection between that small circle and the ellipse. You can then use the calc
library to draw the tangent using.
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{intersections, calc}
\begin{document}
\begin{tikzpicture}
\draw [name path=ellipse] (0,0) ellipse (2cm and 1cm);
\node[shape = circle, inner sep=1.5pt, fill] (P) at (163:2cm and 1cm) {};
\path [name path=aux] (P) circle [radius=1bp];
\draw [name intersections={of=ellipse and aux}] (P) -- ($(intersection-1)!1cm!(intersection-2)$);
\end{tikzpicture}
\end{document}
A different approach is to use a path
with an arc
to place a node with the sloped
option, which will result in the node being oriented along the arc. You can then use the node's anchors to draw the tangent with a fixed length using the calc
library. If your node's name is tangent
, you'd get the unit vector using
\draw (tangent.center) -- ($(tangent.center)!1cm!(tangent.west)$);
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\def\angle{163}
\draw (0,0) ellipse (2cm and 1cm);
\node[shape = circle, inner sep=1.5pt, fill] (P) at (\angle:2cm and 1cm) {};
\path (2,0) arc [
start angle=0,
end angle=\angle,
x radius=2cm,
y radius=1cm
] node [pos=1,sloped, name=tangent] {};
\draw (tangent.center) -- ($(tangent.center)!1cm!(tangent.west)$);
\end{tikzpicture}
\end{document}