# Drawing an arc of a circle centered at a point distinct from the origin

I draw an angle of 30 degrees at the origin. The common endpoint of the two line segments comprising this angle is D and the other endpoints are E' and F. F is at a distance of 4 from line segment DE'. I want to draw an arc of a circle centered at F with radius 5. This arc should intersect DE' at two points. I don't know what arc is drawn with my code!

What is wrong with the code to make the right-angle mark?

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}

% Refer to http://tex.stackexchange.com/questions/196181/why-do-my-arcs-end-at-the-wrong-node-positions
% Refer to  http://www.texample.net/tikz/examples/intersecting-lines/
% To have TikZ calculate the foot of the altitude of a triangle, see Chapter 13, section 5 in the TikZ manual.

\begin{document}

\noindent {\bf 19.) }In $\triangle{\mathit{DEF}}$,  $\vert DF \vert = 8$, $\vert EF \vert = 5$, and $\angle{\mathit{EDF}} = 30$. How many such triangles are there?
\vskip0.2in

\noindent \hspace*{\fill}
\begin{tikzpicture}

%These commands draw edges $DF$ and $E'F$ so that $\angle{\mathit{E'DF}} = 30$.
%$DF$ is to be drawn at an angle of 120 degrees and DE' is to be drawn at an
%angle of angle of 150 degrees. Since the length of DE' is not specified, it
%is to be drawn as a ray.
\coordinate (D) at (0,0);
\node (vertex_D) at ($(D) + (-45:7.5pt)$){$D$};
\coordinate (F) at (120:8);
\node (vertex_F) at ($(F) + (90:7.5pt)$){$F$};
\coordinate (E') at (150:12);
\node (vertex_E') at ($(E') + (-90:7.5pt)$){$E'$};
\draw (D) -- (F);
\draw (D) -- (E');

\path pic[draw, angle radius=10mm,"$30$",angle eccentricity=1.25] {angle = F--D--E'};

%These commands label the length of DF.
\coordinate (DF_midpoint) at ($(D)!0.5!(F)$);
\node (DF_midpoint_label) at ($(DF_midpoint) + (30:7.5pt)$) {8};

%These commands draw the height of the triangle from F to line segment $DE'$.
%The height is labeled $h$.
\coordinate (P) at ($(D)!(F)!(E')$);
\draw [dashed] (F) -- (P) node [midway, right]{$h = 4$};
\node (point_P) at ($(P) + (-120:7.5pt)$){$P$};

%These commands draw an arc of a circle centered at F with radius 5.
\draw[dashed,draw=blue!30] (F) arc (150:290:5);

%The following commands make the right-angle mark and "colors" the inside of it white.
\coordinate (U) at ($(P)!4mm!45:(D)$);
\draw (U) -- ($(D)!(U)!(E')$);
\draw (U) -- ($(F)!(U)!(P)$);

\end{tikzpicture}
\hspace{\fill}
\vskip0.25in

\end{document}

• When you write (F) arc (...), F is the starting point of the arc, not the center! Jun 5, 2015 at 14:40
• \draw[dashed] ([shift=(F)]150:5) arc[start angle=150, end angle=290, radius=5];? Jun 5, 2015 at 14:41
• BTW, \angle{\mathit{EDF}} = 30 would be an angle of 278.87° because the number 30 misses the degree sign. Also neither \angle or \triangle are macros with an argument, therefore the braces around \mathit{...} are not necessary. \bf is deprecated, use \textbf{...} instead. Also a space between 19. and In is missing. Jun 5, 2015 at 15:36
• @Heiko Oberdiek The braces after angle and triangle are just for me to read the code. I will have to get in the habit of using \textbf. Is the command for putting text in italics in text mode textit? I edited the post again to include the space after 19.). Jun 5, 2015 at 16:15

An arc doesn't have center specification so you have a start/end angle and the radius. Also the geometry is not right.

First F is along 120 degree line from D hence you have to place a point relative to that . Here I also move to a point still on the 120 degree line and draw the arc starting from 120 degrees. Had I moved to somewhere else I need to take into account.

I've also commented out your line that makes the right angle problematic. In

A diagram for an argument to the Pythagorean Theorem

I've fixed that with a different syntax already.

\begin{tikzpicture}

\coordinate[label=-45:$D$] (D) at (0,0);
\coordinate[label=90:$F$] (F) at (120:8);
\coordinate[label=-90:$E$] (E) at (150:12);
\draw (F) -- (D) -- (E);
\path pic[draw, angle radius=10mm,"$30$",angle eccentricity=1.25] {angle = F--D--E};
\coordinate[label=45:$8$] (DF_midpoint) at ($(D)!0.5!(F)$);
\coordinate[label=-135:$P$] (P) at ($(D)!(F)!(E)$);
\draw [dashed] (F) -- (P) node [midway, right]{$h = 4$};

\draw[dashed,draw=blue!30] (F) ++(120:5) arc (120:290:5);

\coordinate (U) at ($(P)!4mm!45:(D)$);
%\draw (U) -- ($(D)!(U)!(E)$); % Not necessarily parallel to FP !!!
\draw (U) -- ($(F)!(U)!(P)$);
\end{tikzpicture}


• The question text says, that |EF| = 5, then a circle around F with radius = 5 goes through E, which is located at ($(P)!30mm!180:(D)$). Jun 5, 2015 at 14:56
• @HeikoOberdiek I am indeed confused about the text hence I just followed the drawing spec instead of the geometry. Jun 5, 2015 at 15:02
• @Heiko Oberdiek I will edit the code so that I have E' instead of E in the display. I did not intend to include the problem in my post. Jun 5, 2015 at 15:05
• @percusse Why does \draw (U) -- ($(D)!(U)!(E)$); not necessarily draw a line parallel to FP? ($(D)!(U)!(E)$) is a point through U that is perpendicular to line segment DE. Since DE is perpendicular to FP, the small line segment drawn using \draw (U) -- ($(D)!(U)!(E)$); should be parallel to FP. Jun 5, 2015 at 16:08

Since you're loading the tkz-euclide package, you can specify the center (the tikz arc command does not specify a center), using

\tkzDrawArc[R, color=blue,dashed,thick](F, 5cm)(135,315)

• F is the center.
• 5cm is the radius.
• The last two numbers are the starting and the ending polar coordinates, respectively.
• Lastly, R is an option (from fr. rayon, radius), where you can specify the center and then a radius.

## Code

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}

% Refer to http://tex.stackexchange.com/questions/196181/why-do-my-arcs-end-at-the-wrong-node-positions
% Refer to  http://www.texample.net/tikz/examples/intersecting-lines/
% To have TikZ calculate the foot of the altitude of a triangle, see Chapter 13, section 5 in the TikZ manual.

\begin{document}
\begin{tikzpicture}

%These commands draw edges $DF$ and $E'F$ so that $\angle{\mathit{E'DF}} = 30$.
%$DF$ is to be drawn at an angle of 120 degrees and DE' is to be drawn at an
%angle of angle of 150 degrees. Since the length of DE' is not specified, it
%is to be drawn as a ray.
\coordinate (D) at (0,0);
\node (vertex_D) at ($(D) + (-45:7.5pt)$){$D$};
\coordinate (F) at (120:8);
\node (vertex_F) at ($(F) + (90:7.5pt)$){$F$};
\coordinate (E') at (150:12);
\node (vertex_E') at ($(E') + (-90:7.5pt)$){$E'$};
\draw (D) -- (F);
\draw (D) -- (E');

\path pic[draw, angle radius=10mm,"$30$",angle eccentricity=1.25] {angle = F--D--E'};

%These commands label the length of DF.
\coordinate (DF_midpoint) at ($(D)!0.5!(F)$);
\node (DF_midpoint_label) at ($(DF_midpoint) + (30:7.5pt)$) {8};

%These commands draw the height of the triangle from F to line segment $DE'$.
%The height is labeled $h$.
\coordinate (P) at ($(D)!(F)!(E')$);
\draw [dashed] (F) -- (P) node [midway, right]{$h = 4$};
\node (point_P) at ($(P) + (-120:7.5pt)$){$P$};

%These commands draw an arc of a circle centered at F with radius 5.
%\draw[dashed,draw=blue!30] (F) arc (150:290:5);
\tkzDrawArc[R,color=blue,dashed, thick](F, 5)(125,315)

%The following commands make the right-angle mark and "colors" the inside of it white.
\coordinate (U) at ($(P)!4mm!45:(D)$);
\draw (U) -- ($(D)!(U)!(E')$);
\draw (U) -- ($(F)!(U)!(P)$);

\end{tikzpicture}
\hspace{\fill}
\vskip0.25in

\end{document}

• I was careless in loading tkz-euclide. I want to make the right-angle mark just using TikZ. By the way, I was also careless with using E. I replaced E in the TikZ picture with E'. (You can copy the code from my post ... if you want.) Why isn't my code making a right-angle mark? Percusse says that \draw (U) -- ($(D)!(U)!(E)$); does not necessarily draw a line parallel to FP. Jun 5, 2015 at 15:20
• @user74973 Well, to be fair tkz-euclide adds some nice things that it's harder to accomplish with regular Tikz. For example you can also draw a parallel line to another one fairly easy. No problem about E', I'll fix it. Jun 5, 2015 at 15:24
• @user74973 Ah yes, that is not parallel. You can use tkz-euclide again for this but maybe you don't want to use the package. Jun 5, 2015 at 15:27
• I am trying to familiarize myself with TikZ, as you can surmise from my many posts. Jun 5, 2015 at 15:28
• Do you know why \draw (U) -- ($(D)!(U)!(E)$); does not necessarily draw a line parallel to FP? I read that $(D)!(U)!(E)$ is a point through U that is perpendicular to line segment DE. Since DE is perpendicular to FP, the small line segment drawing using \draw (U) -- ($(D)!(U)!(E)$); should be parallel to FP. Jun 5, 2015 at 15:30