I would like to draw a normal vector on a curve at a specific point. I looked up several questions (e.g. 1, 2, 3, etc) and the answers contain nice solutions for drawing a tangent or normal vector to a curve at a given point which is specified by a variable between 0 and 1 giving the distance moved on the curve.

Another example uses absolute distances, but that coordinate still "travels" along the curve.

I, however, have several curves where I know a point's absolute coordinates (relative to the picture's coordinate system) but not exactly, where it sits on that curve in that relative coordinate.

I the following (not minimal, but working) example, I use the very useful code from this answer and find by trial and error, that the relative coordinate of my point P is roughly 0.5573. As I will use this for different types of curves and different points, trying out is very tedious. Is there a nice solution with absolute coordinates?

            markings,% switch on markings
            at position #1
                \coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
                \coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
                \coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
    use tangent/.style={
        shift=(tangent point-#1),
        x=(tangent unit vector-#1),
        y=(tangent orthogonal unit vector-#1)
    use tangent/.default=1}
\begin{tikzpicture}[%baseline={([yshift=-.0ex]current bounding box.center)},
    % coordinates
    \coordinate(O) at (0,0);
    \coordinate(OAend) at (90:5.5);
    \coordinate(OAstart) at (-90:.5);
    \coordinate(X1) at (180:.5);
    \coordinate(X2) at (0:3.5);
    \coordinate(P) at (40:3cm and 5cm);
    \coordinate(P2) at ($1.5*(P)$);
    \coordinate(ARCSTART) at (-10:3cm and 5cm);
    % curve
    \draw[tangent=0.5573,color=darkgray] (ARCSTART) arc  (-10:95:3cm and 5cm);
    % other lines
    \path[kvect] (OAstart) edge (OAend); % optical axis
    \path[kvect] (X1) edge (X2);
    \path[kvect,color=green] (O) edge (P);
    \path[dashed,color=green] (P) edge (P2);
    \path [kvect,color=green, use tangent](0,0) edge (0,-3) [] {};
    \path [use tangent](0,0) -- (0,-3) node (Sp) [] {};
    \path pic["$\rho$",angle eccentricity=1.5,angle radius=0.6cm,draw,<-,>=stealth,color=green] {angle = Sp--P--P2};
    \path pic["$\theta$",angle eccentricity=1.5,angle radius=0.6cm,draw] {angle = P--O--OAend};

screenshot of example

  • if you know where it is then you can just place it no?
    – percusse
    Feb 26, 2016 at 4:34
  • In the case of an elliptic curve, I could do the math, of course. However, a solution for arbitrary curves would be nice Feb 26, 2016 at 8:47

1 Answer 1


Using the tzplot package:

enter image description here



\tzcoor(40:3 and 5)(P)
\tzarcfrom[gray]"arcA"(-10:3 and 5)(-10:95:3 and 5)
\tzhXpointat{tan}{2}(P3a)        % (P3a): point on tangent line
\tzcoor($(P)!1cm!90:(P3a)$)(P3)  % (P3) : point on normal  line


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .