# Drawing arc with pgf

Using pgf, I'd like to draw an arc (part of a circle) with a given center. I don't know the exact co-ordinates of the center, because it was obtained as an intersection of other geometric objects. The desired center has a name, but no known co-ordinates. How can I do this?

Basically, I'd like to modify an instruction of the form

 \node (H) [name path=H, draw, circle through=(A')] at (E) {};


to produce just a part of the circle.

• You should provide a Minimal Working example starting with \documentclass and ending with \end{document} that provides all the minimal necessary commands and instructions to understand what you want. You should also specify which libraries you are loading and what are you doing.
– gjkf
Mar 2, 2020 at 14:07
• I'm a bit unsure what's so hard to understand. I have points A' and E defined and would like to draw merely part of the circle through A' at E. Mar 2, 2020 at 14:11
• Of course, if you know the starting location and angle and radius (needed for arc with tikz), you can locate the center. The problem is usually finding the angles. Mar 3, 2020 at 2:06
• Possible duplicate: tex.stackexchange.com/q/66216/14500 Mar 3, 2020 at 6:24

You can use the arc command of Tikz, like so:

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
\coordinate (O) at (0,0); % Your coordinate name
\draw (O) -- ++(0:1) arc (0:150:1); % start:end:radius
\end{tikzpicture}
\end{document}


which results in something like this

In general your last command will be

\draw (center) -- ++(start:radius) arc(start:end:radius) -- (center);

• That's great, but I'd just like the arc, without the two radii included. Mar 2, 2020 at 14:09
• \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \coordinate (O) at (0,0); % Your coordinate name \draw (O)+(0:1) arc (0:150:1); % start:end:radius \end{tikzpicture} \end{document} ? Mar 2, 2020 at 14:13

I did not really understand the question. I assume you want to create a circular node centered on E, which goes through A but draw partially!

I suggest the solution below

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{calc,intersections}
\usetikzlibrary{through}
\usepackage{SIunitx}

\begin{document}

\begin{tikzpicture}

\node[label=A] (A)  at (1,1) {+};

\node[label=E] (E) at (0,2){+};

\node (H) [name path=H, circle through=(A)] at (E) {};

\draw[red,thick]
let
\p1=(E.center), \p2=(A), \n1={veclen(\y2-\y1,\x2-\y1)}
in
(H.45) arc (45:180: \n1);

\draw (H) -- ++(3,4);
\draw (H) -- ++(-3,5);
\end{tikzpicture}

\end{document}


1) First of all if the center has a name then you can know its coordinates:

102.6 Extracting Coordinates There are two commands that can be used to “extract” the x- or y-coordinate of a coordinate.

\pgfextractx{\pgf@x}{\pgfpointanchor{E}{center}} \pgfextracty{\pgf@y}{\pgfpointanchor{E}{center}}

2) With tkz-euclideyou have:

\documentclass{standalone}
\usepackage{tkz-euclide}
\begin{document}

\begin{tikzpicture}
\coordinate[label=$O$] (O) at (3,1);
\coordinate [label=$A$](A) at (1,5);
\coordinate [label=$B$](B) at (2,4);
\coordinate [label=$C$](C) at (3,2);
\coordinate [label=$D$](D) at (5,0);
\coordinate [label=$E$](E) at (5,1);
\tkzCompass[thick,blue](O,A)
\tkzCompass[thick,red,delta=20](O,B)
\tkzCompass[thick,orange,length=2](O,C)
\tkzDrawArc[thick,brown](O,D)(E)
\foreach \point in {A,...,E,O}
\fill [black,opacity=.5] (\point) circle (1pt);
\end{tikzpicture}
\end{document}


a) The macro \tkzCompass can draw an arc with a center through a point. Without option (you can use TikZ's options) the arc has a length of 1 cm;

b) you can use the option length to change the default value length =2 for 2cm;

c) you can use the option delta. delta=20 means that the ends of the arc makes an angle of 40 degrees with the center;

d) more subtle is the last possibility. With \tkzDrawArc(O,D)(E) you draw an arc with center O passing through D and stopping on the half line [OE).