TikZ-PGF – How to Draw Right Arc of Ellipse with TikZ

tikz-pgf

I want to draw a part of the ellipse from B to D as shown. I calculated the angle BAD and then used arc command to draw. But the result is not the desire. I have to find out, the command arc change center of the center origin ellipse.
I can use the \clip command to crop the desired BD output. But is there a way to draw a BD?

Here is code

\documentclass{article}
\usepackage{tkz-euclide}
\usetikzlibrary{intersections}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round]
    \tkzDefPoint(0,0){A}
    \tkzDefPoint(3,0){B}
    \tkzDefPoint(-4,-2){C}
    \draw[dashed,thin,name path=elip] (A) ellipse (3cm and 1cm);
    \draw[draw=none,name path=AC] (A)--(C);
    \draw[name intersections={of=elip and AC, by={D}}];
    \tkzDrawPoints[fill=black](A,B,C,D)
    \tkzDrawSegments(A,B A,D D,C)
    \tkzLabelPoints(A,B,C,D)
    \tkzFindAngle (B,A,D) \tkzGetAngle{an} \FPround\an\an{0}
    \draw (B) arc (0:\an:3cm and 1cm);
    \draw (0,2) node{$\widehat{BAD}=\an^\circ$};
\end{tikzpicture}
\end{document}

https://imgur.com/a/SxHB8

I use Google Translate. Thanks.

Best Answer

One can compute the correct angle using pgfmath and atan2.

LaTeX math

\documentclass{article}
\usepackage{tkz-euclide}
\usetikzlibrary{intersections}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round]
    \tkzDefPoint(0,0){A}
    \tkzDefPoint(3,0){B}
    \tkzDefPoint(-4,-2){C}
    \draw[dashed,thin,name path=elip] (A) ellipse (3cm and 1cm);
    \draw[draw=none,name path=AC] (A)--(C);
    \draw[name intersections={of=elip and AC, by={D}}];
    \tkzDrawPoints[fill=black](A,B,C,D)
    \tkzDrawSegments(A,B A,D D,C)
    \tkzLabelPoints(A,B,C,D)
    \tkzFindAngle (B,A,D) \tkzGetAngle{an} \FPround\an\an{0}
    \pgfmathsetmacro{\ann}{atan2(sin(\an),cos(\an)/3)}% compute compensated angle
    \draw (B) arc (0:\ann:3cm and 1cm);
    \draw (0,2) node{$\widehat{BAD}=\an^\circ$};
\end{tikzpicture}
\end{document}

demo